Fix API changes of WebContentsDelegate
This commit is contained in:
parent
819ab5cd0c
commit
8a138fafd4
4 changed files with 18 additions and 12 deletions
|
@ -96,6 +96,7 @@ bool WebContents::AddMessageToConsole(content::WebContents* source,
|
||||||
bool WebContents::ShouldCreateWebContents(
|
bool WebContents::ShouldCreateWebContents(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
int route_id,
|
int route_id,
|
||||||
|
int main_frame_route_id,
|
||||||
WindowContainerType window_container_type,
|
WindowContainerType window_container_type,
|
||||||
const base::string16& frame_name,
|
const base::string16& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
|
@ -222,7 +223,7 @@ void WebContents::DidStopLoading(content::RenderViewHost* render_view_host) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::DidGetRedirectForResourceRequest(
|
void WebContents::DidGetRedirectForResourceRequest(
|
||||||
content::RenderViewHost* render_view_host,
|
content::RenderFrameHost* render_frame_host,
|
||||||
const content::ResourceRedirectDetails& details) {
|
const content::ResourceRedirectDetails& details) {
|
||||||
Emit("did-get-redirect-request",
|
Emit("did-get-redirect-request",
|
||||||
details.url,
|
details.url,
|
||||||
|
@ -284,9 +285,8 @@ void WebContents::DidAttach(int guest_proxy_routing_id) {
|
||||||
Emit("did-attach");
|
Emit("did-attach");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::ElementSizeChanged(const gfx::Size& old_size,
|
void WebContents::ElementSizeChanged(const gfx::Size& size) {
|
||||||
const gfx::Size& new_size) {
|
element_size_ = size;
|
||||||
element_size_ = new_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::GuestSizeChanged(const gfx::Size& old_size,
|
void WebContents::GuestSizeChanged(const gfx::Size& old_size,
|
||||||
|
@ -303,9 +303,10 @@ void WebContents::RegisterDestructionCallback(
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::WillAttach(content::WebContents* embedder_web_contents,
|
void WebContents::WillAttach(content::WebContents* embedder_web_contents,
|
||||||
int browser_plugin_instance_id) {
|
int element_instance_id,
|
||||||
|
bool is_full_page_plugin) {
|
||||||
embedder_web_contents_ = embedder_web_contents;
|
embedder_web_contents_ = embedder_web_contents;
|
||||||
element_instance_id_ = browser_plugin_instance_id;
|
element_instance_id_ = element_instance_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::Destroy() {
|
void WebContents::Destroy() {
|
||||||
|
|
|
@ -120,6 +120,7 @@ class WebContents : public mate::EventEmitter,
|
||||||
bool ShouldCreateWebContents(
|
bool ShouldCreateWebContents(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
int route_id,
|
int route_id,
|
||||||
|
int main_frame_route_id,
|
||||||
WindowContainerType window_container_type,
|
WindowContainerType window_container_type,
|
||||||
const base::string16& frame_name,
|
const base::string16& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
|
@ -161,7 +162,7 @@ class WebContents : public mate::EventEmitter,
|
||||||
void DidStartLoading(content::RenderViewHost* render_view_host) override;
|
void DidStartLoading(content::RenderViewHost* render_view_host) override;
|
||||||
void DidStopLoading(content::RenderViewHost* render_view_host) override;
|
void DidStopLoading(content::RenderViewHost* render_view_host) override;
|
||||||
void DidGetRedirectForResourceRequest(
|
void DidGetRedirectForResourceRequest(
|
||||||
content::RenderViewHost* render_view_host,
|
content::RenderFrameHost* render_frame_host,
|
||||||
const content::ResourceRedirectDetails& details) override;
|
const content::ResourceRedirectDetails& details) override;
|
||||||
void DidNavigateMainFrame(
|
void DidNavigateMainFrame(
|
||||||
const content::LoadCommittedDetails& details,
|
const content::LoadCommittedDetails& details,
|
||||||
|
@ -174,13 +175,13 @@ class WebContents : public mate::EventEmitter,
|
||||||
|
|
||||||
// content::BrowserPluginGuestDelegate:
|
// content::BrowserPluginGuestDelegate:
|
||||||
void DidAttach(int guest_proxy_routing_id) final;
|
void DidAttach(int guest_proxy_routing_id) final;
|
||||||
void ElementSizeChanged(const gfx::Size& old_size,
|
void ElementSizeChanged(const gfx::Size& size) final;
|
||||||
const gfx::Size& new_size) final;
|
|
||||||
void GuestSizeChanged(const gfx::Size& old_size,
|
void GuestSizeChanged(const gfx::Size& old_size,
|
||||||
const gfx::Size& new_size) final;
|
const gfx::Size& new_size) final;
|
||||||
void RegisterDestructionCallback(const DestructionCallback& callback) final;
|
void RegisterDestructionCallback(const DestructionCallback& callback) final;
|
||||||
void WillAttach(content::WebContents* embedder_web_contents,
|
void WillAttach(content::WebContents* embedder_web_contents,
|
||||||
int browser_plugin_instance_id) final;
|
int element_instance_id,
|
||||||
|
bool is_full_page_plugin) final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Called when received a message from renderer.
|
// Called when received a message from renderer.
|
||||||
|
|
|
@ -515,6 +515,7 @@ void NativeWindow::NotifyWindowLeaveFullScreen() {
|
||||||
bool NativeWindow::ShouldCreateWebContents(
|
bool NativeWindow::ShouldCreateWebContents(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
int route_id,
|
int route_id,
|
||||||
|
int main_frame_route_id,
|
||||||
WindowContainerType window_container_type,
|
WindowContainerType window_container_type,
|
||||||
const base::string16& frame_name,
|
const base::string16& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
|
@ -568,7 +569,8 @@ content::WebContents* NativeWindow::OpenURLFromTab(
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
content::JavaScriptDialogManager* NativeWindow::GetJavaScriptDialogManager() {
|
content::JavaScriptDialogManager* NativeWindow::GetJavaScriptDialogManager(
|
||||||
|
content::WebContents* source) {
|
||||||
if (!dialog_manager_)
|
if (!dialog_manager_)
|
||||||
dialog_manager_.reset(new AtomJavaScriptDialogManager);
|
dialog_manager_.reset(new AtomJavaScriptDialogManager);
|
||||||
|
|
||||||
|
|
|
@ -235,6 +235,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
||||||
bool ShouldCreateWebContents(
|
bool ShouldCreateWebContents(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
int route_id,
|
int route_id,
|
||||||
|
int main_frame_route_id,
|
||||||
WindowContainerType window_container_type,
|
WindowContainerType window_container_type,
|
||||||
const base::string16& frame_name,
|
const base::string16& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
|
@ -243,7 +244,8 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
||||||
content::WebContents* OpenURLFromTab(
|
content::WebContents* OpenURLFromTab(
|
||||||
content::WebContents* source,
|
content::WebContents* source,
|
||||||
const content::OpenURLParams& params) override;
|
const content::OpenURLParams& params) override;
|
||||||
content::JavaScriptDialogManager* GetJavaScriptDialogManager() override;
|
content::JavaScriptDialogManager* GetJavaScriptDialogManager(
|
||||||
|
content::WebContents* source) override;
|
||||||
void BeforeUnloadFired(content::WebContents* tab,
|
void BeforeUnloadFired(content::WebContents* tab,
|
||||||
bool proceed,
|
bool proceed,
|
||||||
bool* proceed_to_fire_unload) override;
|
bool* proceed_to_fire_unload) override;
|
||||||
|
|
Loading…
Reference in a new issue