diff options
Diffstat (limited to 'chrome')
10 files changed, 2 insertions, 34 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index cf890e4..ca7af5e 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -635,12 +635,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 aa66275..84e50f6 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -408,7 +408,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 9050cbd..d61e408 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -674,11 +674,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 66306ae..92aecf8 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2755,10 +2755,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 e01772f..c1c408c 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -956,7 +956,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.h b/chrome/browser/tab_contents/tab_contents_delegate.h index f7eb5e7..0adfd09 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; |