diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 21:46:02 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 21:46:02 +0000 |
commit | 74464846f36668ff02e4f25dfd44eb5bc21eb5b4 (patch) | |
tree | b7dc1d55d43a941e8b0f21bf7236cbffa59e856c /chrome/browser | |
parent | 735085ed203ee840e493971d9a87c156f45d67b0 (diff) | |
download | chromium_src-74464846f36668ff02e4f25dfd44eb5bc21eb5b4.zip chromium_src-74464846f36668ff02e4f25dfd44eb5bc21eb5b4.tar.gz chromium_src-74464846f36668ff02e4f25dfd44eb5bc21eb5b4.tar.bz2 |
TBR:brettw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
11 files changed, 2 insertions, 36 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 60182ef..b44c4aa 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -636,12 +636,6 @@ void RenderViewHost::GotFocus() { view->GotFocus(); } -bool RenderViewHost::CanBlur() const { - // TODO(brettw) is seems like this function is never implemented. It and the - // messages leading here should be removed. - return delegate_->CanBlur(); -} - void RenderViewHost::SetInitialFocus(bool reverse) { Send(new ViewMsg_SetInitialFocus(routing_id(), reverse)); } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index b1478b5..ac5e959 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -411,7 +411,6 @@ class RenderViewHost : public RenderWidgetHost { virtual bool IsRenderView() const { return true; } virtual void OnMessageReceived(const IPC::Message& msg); virtual void GotFocus(); - virtual bool CanBlur() const; virtual void ForwardMouseEvent(const WebKit::WebMouseEvent& mouse_event); virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event); virtual void ForwardEditCommand(const std::string& name, diff --git a/chrome/browser/renderer_host/render_view_host_delegate.cc b/chrome/browser/renderer_host/render_view_host_delegate.cc index fcaf770..edff1bf 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.cc +++ b/chrome/browser/renderer_host/render_view_host_delegate.cc @@ -88,10 +88,6 @@ WebPreferences RenderViewHostDelegate::GetWebkitPrefs() { return WebPreferences(); } -bool RenderViewHostDelegate::CanBlur() const { - return true; -} - gfx::Rect RenderViewHostDelegate::GetRootWindowResizerRect() const { return gfx::Rect(); } diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index eec96e8..fe0f710 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -675,11 +675,6 @@ class RenderViewHostDelegate { // Notification from the renderer that JS runs out of memory. virtual void OnJSOutOfMemory() {} - // Returns true if this this object can be blurred through a javascript - // obj.blur() call. ConstrainedWindows shouldn't be able to be blurred, but - // generally most other windows will be. - virtual bool CanBlur() const; - // Return the rect where to display the resize corner, if any, otherwise // an empty rect. virtual gfx::Rect GetRootWindowResizerRect() const; diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index c7e3cd6..0b0e114 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -245,9 +245,6 @@ class RenderWidgetHost : public IPC::Channel::Listener, // Returns the video layer if it exists, NULL otherwise. VideoLayer* video_layer() const { return video_layer_.get(); } - // Checks to see if we can give up focus to this widget through a JS call. - virtual bool CanBlur() const { return true; } - // Starts a hang monitor timeout. If there's already a hang monitor timeout // the new one will only fire if it has a shorter delay than the time // left on the existing timeouts. diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index 197491e..693ff5e 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -603,11 +603,7 @@ void RenderWidgetHostViewGtk::Focus() { void RenderWidgetHostViewGtk::Blur() { // TODO(estade): We should be clearing native focus as well, but I know of no // way to do that without focusing another widget. - // TODO(estade): it doesn't seem like the CanBlur() check should be necessary - // since we are only called in response to a ViewHost blur message, but this - // check is made on Windows so I've added it here as well. - if (host_->CanBlur()) - host_->Blur(); + host_->Blur(); } bool RenderWidgetHostViewGtk::HasFocus() { diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index f4cbd24..255ae63 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -523,7 +523,7 @@ void RenderWidgetHostViewWin::Blur() { views::FocusManager* focus_manager = views::FocusManager::GetFocusManagerForNativeView(m_hWnd); // We don't have a FocusManager if we are hidden. - if (focus_manager && render_widget_host_->CanBlur()) + if (focus_manager) focus_manager->ClearFocus(); } diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index f55a6c5..dd5e558 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2756,10 +2756,6 @@ void TabContents::OnCrossSiteResponse(int new_render_process_host_id, new_request_id); } -bool TabContents::CanBlur() const { - return delegate() ? delegate()->CanBlur() : true; -} - gfx::Rect TabContents::GetRootWindowResizerRect() const { if (delegate()) return delegate()->GetRootWindowResizerRect(); diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index ed8b08d..59e75e1 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -957,7 +957,6 @@ class TabContents : public PageNavigator, virtual void OnJSOutOfMemory(); virtual void OnCrossSiteResponse(int new_render_process_host_id, int new_request_id); - virtual bool CanBlur() const; virtual gfx::Rect GetRootWindowResizerRect() const; virtual void RendererUnresponsive(RenderViewHost* render_view_host, bool is_during_unload); diff --git a/chrome/browser/tab_contents/tab_contents_delegate.cc b/chrome/browser/tab_contents/tab_contents_delegate.cc index c200f3c..7ba80d6 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.cc +++ b/chrome/browser/tab_contents/tab_contents_delegate.cc @@ -23,8 +23,6 @@ bool TabContentsDelegate::IsApplication() const { return false; } void TabContentsDelegate::ConvertContentsToApplication(TabContents* source) { } -bool TabContentsDelegate::CanBlur() const { return true; } - bool TabContentsDelegate::CanReloadContents(TabContents* source) const { return true; } diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index 4dd8e1a..bb2e6f8 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -125,10 +125,6 @@ class TabContentsDelegate : public AutomationResourceRoutingDelegate { // a TabContents with a valid WebApp set. virtual void ConvertContentsToApplication(TabContents* source); - // Whether this tab can be blurred through a javascript obj.blur() - // call. ConstrainedWindows shouldn't be able to be blurred. - virtual bool CanBlur() const; - // Whether the specified tab can be reloaded. // Reloading can be disabled e. g. for the DevTools window. virtual bool CanReloadContents(TabContents* source) const; |