Commit b492bcc3 authored by Robert Liao's avatar Robert Liao Committed by Commit Bot

Rename ExtensionView::DidStopLoading() to OnLoaded()

ExtensionView::DidStopLoading() collided with
content::WebContentsObserver::DidStopLoading().

BUG=818397
TBR=rdevlin.cronin@chromium.org
Method rename.

Change-Id: I15ea2074f7c430429d2538ef19c858cb74f549b3
Reviewed-on: https://chromium-review.googlesource.com/954065
Commit-Queue: Robert Liao <robliao@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542049}
parent fa4bf5a6
...@@ -47,7 +47,7 @@ class ExtensionView { ...@@ -47,7 +47,7 @@ class ExtensionView {
const content::NativeWebKeyboardEvent& event) = 0; const content::NativeWebKeyboardEvent& event) = 0;
// Method for the ExtensionHost to notify that the extension page has loaded. // Method for the ExtensionHost to notify that the extension page has loaded.
virtual void DidStopLoading() = 0; virtual void OnLoaded() = 0;
}; };
} // namespace extensions } // namespace extensions
......
...@@ -114,7 +114,7 @@ void ExtensionViewHost::UnhandledKeyboardEvent( ...@@ -114,7 +114,7 @@ void ExtensionViewHost::UnhandledKeyboardEvent(
// ExtensionHost overrides: // ExtensionHost overrides:
void ExtensionViewHost::OnDidStopFirstLoad() { void ExtensionViewHost::OnDidStopFirstLoad() {
view_->DidStopLoading(); view_->OnLoaded();
} }
void ExtensionViewHost::LoadInitialURL() { void ExtensionViewHost::LoadInitialURL() {
......
...@@ -62,7 +62,7 @@ class ExtensionViewMac : public extensions::ExtensionView { ...@@ -62,7 +62,7 @@ class ExtensionViewMac : public extensions::ExtensionView {
void HandleKeyboardEvent( void HandleKeyboardEvent(
content::WebContents* source, content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override; const content::NativeWebKeyboardEvent& event) override;
void DidStopLoading() override; void OnLoaded() override;
private: private:
content::RenderViewHost* render_view_host() const; content::RenderViewHost* render_view_host() const;
......
...@@ -82,7 +82,7 @@ void ExtensionViewMac::HandleKeyboardEvent( ...@@ -82,7 +82,7 @@ void ExtensionViewMac::HandleKeyboardEvent(
[event_window redispatchKeyEvent:event.os_event]; [event_window redispatchKeyEvent:event.os_event];
} }
void ExtensionViewMac::DidStopLoading() { void ExtensionViewMac::OnLoaded() {
ShowIfCompletelyLoaded(); ShowIfCompletelyLoaded();
} }
......
...@@ -107,14 +107,16 @@ void ExtensionViewViews::HandleKeyboardEvent( ...@@ -107,14 +107,16 @@ void ExtensionViewViews::HandleKeyboardEvent(
GetFocusManager()); GetFocusManager());
} }
void ExtensionViewViews::DidStopLoading() { void ExtensionViewViews::OnLoaded() {
// We wait to show the ExtensionViewViews until it has loaded, and the view DCHECK(host_->has_loaded_once());
// has actually been created. These can happen in different orders.
// TODO(devlin): Can they? Isn't the view created during construction? // ExtensionPopup delegates showing the view to OnLoaded(). ExtensionDialog
if (!visible() && host_->has_loaded_once()) { // handles visibility directly.
SetVisible(true); if (visible())
ResizeDueToAutoResize(web_contents(), pending_preferred_size_); return;
}
SetVisible(true);
ResizeDueToAutoResize(web_contents(), pending_preferred_size_);
} }
gfx::NativeCursor ExtensionViewViews::GetCursor(const ui::MouseEvent& event) { gfx::NativeCursor ExtensionViewViews::GetCursor(const ui::MouseEvent& event) {
......
...@@ -60,7 +60,7 @@ class ExtensionViewViews : public views::WebView, ...@@ -60,7 +60,7 @@ class ExtensionViewViews : public views::WebView,
void HandleKeyboardEvent( void HandleKeyboardEvent(
content::WebContents* source, content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override; const content::NativeWebKeyboardEvent& event) override;
void DidStopLoading() override; void OnLoaded() override;
// views::WebView: // views::WebView:
gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment