Remove the offscreen-render option
We are going to move the APIs to WebContents
This commit is contained in:
parent
ec90d03d74
commit
d7bac5a10b
4 changed files with 0 additions and 18 deletions
|
@ -167,9 +167,6 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
||||||
options.Get(switches::kTitle, &title);
|
options.Get(switches::kTitle, &title);
|
||||||
SetTitle(title);
|
SetTitle(title);
|
||||||
|
|
||||||
offscreen_ = false;
|
|
||||||
options.Get(switches::kOffScreenRender, &offscreen_);
|
|
||||||
|
|
||||||
// Then show it.
|
// Then show it.
|
||||||
bool show = true;
|
bool show = true;
|
||||||
options.Get(switches::kShow, &show);
|
options.Get(switches::kShow, &show);
|
||||||
|
@ -297,8 +294,6 @@ void NativeWindow::CapturePage(const gfx::Rect& rect,
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::SetFrameSubscription(bool isOffscreen) {
|
void NativeWindow::SetFrameSubscription(bool isOffscreen) {
|
||||||
if (!isOffscreen && !offscreen_) return;
|
|
||||||
|
|
||||||
const auto view = web_contents()->GetRenderWidgetHostView();
|
const auto view = web_contents()->GetRenderWidgetHostView();
|
||||||
|
|
||||||
if (view) {
|
if (view) {
|
||||||
|
@ -314,8 +309,6 @@ void NativeWindow::SetFrameSubscription(bool isOffscreen) {
|
||||||
} else {
|
} else {
|
||||||
view->EndFrameSubscription();
|
view->EndFrameSubscription();
|
||||||
}
|
}
|
||||||
|
|
||||||
offscreen_ = isOffscreen;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,10 +513,6 @@ void NativeWindow::SendMouseWheelEvent(int modifiers, int x, int y, bool precise
|
||||||
host->ForwardWheelEvent(*wheel_event);
|
host->ForwardWheelEvent(*wheel_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) {
|
|
||||||
SetFrameSubscription(offscreen_);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NativeWindow::RenderViewCreated(
|
void NativeWindow::RenderViewCreated(
|
||||||
content::RenderViewHost* render_view_host) {
|
content::RenderViewHost* render_view_host) {
|
||||||
if (!transparent_)
|
if (!transparent_)
|
||||||
|
|
|
@ -246,7 +246,6 @@ class NativeWindow : public content::WebContentsObserver,
|
||||||
|
|
||||||
// content::WebContentsObserver:
|
// content::WebContentsObserver:
|
||||||
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
|
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
|
||||||
void DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) override;
|
|
||||||
void BeforeUnloadDialogCancelled() override;
|
void BeforeUnloadDialogCancelled() override;
|
||||||
void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
|
void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
|
||||||
bool OnMessageReceived(const IPC::Message& message) override;
|
bool OnMessageReceived(const IPC::Message& message) override;
|
||||||
|
@ -267,8 +266,6 @@ class NativeWindow : public content::WebContentsObserver,
|
||||||
const SkBitmap& bitmap,
|
const SkBitmap& bitmap,
|
||||||
content::ReadbackResponse response);
|
content::ReadbackResponse response);
|
||||||
|
|
||||||
bool offscreen_;
|
|
||||||
|
|
||||||
// Whether window has standard frame.
|
// Whether window has standard frame.
|
||||||
bool has_frame_;
|
bool has_frame_;
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,6 @@ const char kRegisterStandardSchemes[] = "register-standard-schemes";
|
||||||
// The browser process app model ID
|
// The browser process app model ID
|
||||||
const char kAppUserModelId[] = "app-user-model-id";
|
const char kAppUserModelId[] = "app-user-model-id";
|
||||||
|
|
||||||
const char kOffScreenRender[] = "offscreen-render";
|
|
||||||
|
|
||||||
const char kModifiers[] = "modifiers";
|
const char kModifiers[] = "modifiers";
|
||||||
const char kKeyCode[] = "code";
|
const char kKeyCode[] = "code";
|
||||||
const char kNativeKeyCode[] = "native";
|
const char kNativeKeyCode[] = "native";
|
||||||
|
|
|
@ -62,8 +62,6 @@ extern const char kRegisterStandardSchemes[];
|
||||||
|
|
||||||
extern const char kAppUserModelId[];
|
extern const char kAppUserModelId[];
|
||||||
|
|
||||||
extern const char kOffScreenRender[];
|
|
||||||
|
|
||||||
extern const char kModifiers[];
|
extern const char kModifiers[];
|
||||||
extern const char kKeyCode[];
|
extern const char kKeyCode[];
|
||||||
extern const char kNativeKeyCode[];
|
extern const char kNativeKeyCode[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue