2014-06-16 06:27:57 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_RENDERER_API_ATOM_API_WEB_VIEW_H_
|
|
|
|
#define ATOM_RENDERER_API_ATOM_API_WEB_VIEW_H_
|
|
|
|
|
|
|
|
#include "native_mate/handle.h"
|
|
|
|
#include "native_mate/wrappable.h"
|
|
|
|
|
2014-06-28 14:33:00 +00:00
|
|
|
namespace blink {
|
2014-06-16 06:27:57 +00:00
|
|
|
class WebView;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
namespace api {
|
|
|
|
|
|
|
|
class WebView : public mate::Wrappable {
|
|
|
|
public:
|
|
|
|
static mate::Handle<WebView> Create(v8::Isolate* isolate);
|
|
|
|
|
|
|
|
private:
|
|
|
|
WebView();
|
|
|
|
virtual ~WebView();
|
|
|
|
|
2014-06-16 06:39:29 +00:00
|
|
|
double SetZoomLevel(double level);
|
2014-06-16 06:27:57 +00:00
|
|
|
double GetZoomLevel() const;
|
2014-06-16 06:39:29 +00:00
|
|
|
double SetZoomFactor(double factor);
|
|
|
|
double GetZoomFactor() const;
|
2014-06-16 06:27:57 +00:00
|
|
|
|
2014-10-22 13:01:12 +00:00
|
|
|
v8::Handle<v8::Value> RegisterEmbedderCustomElement(
|
|
|
|
const base::string16& name, v8::Handle<v8::Object> options);
|
|
|
|
|
2014-06-16 06:27:57 +00:00
|
|
|
// mate::Wrappable:
|
|
|
|
virtual mate::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
|
|
|
v8::Isolate* isolate);
|
|
|
|
|
2014-06-28 14:33:00 +00:00
|
|
|
blink::WebView* web_view_;
|
2014-06-16 06:27:57 +00:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(WebView);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_RENDERER_API_ATOM_API_WEB_VIEW_H_
|