diff options
author | alekseys@chromium.org <alekseys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 22:33:03 +0000 |
---|---|---|
committer | alekseys@chromium.org <alekseys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-16 22:33:03 +0000 |
commit | e2356245e357455e99aade6a0800032b115c1b53 (patch) | |
tree | dcd58e1a53d918716650531111141d266d6aea9b /chrome/browser/tab_contents | |
parent | 880a6d5e6933a40338c06fcc5d9fd7ae5e654a4a (diff) | |
download | chromium_src-e2356245e357455e99aade6a0800032b115c1b53.zip chromium_src-e2356245e357455e99aade6a0800032b115c1b53.tar.gz chromium_src-e2356245e357455e99aade6a0800032b115c1b53.tar.bz2 |
Handle resize corner layout entirely in the BrowserView (views) or BrowserWindow* (Mac)
and extend RenderViewHost with a concept of reserved contents rect, a place to show extra stuff,
such as Sidebar's mini tab UI.
sidebar UI implementation warranted this change (mini tabs UI and resize corner area for sidebar
contents).
TabContentsDelegate::GetRootWindowResizerRect() is no more, reserved contents area is now cached
in RenderWidgetHostView and updated upon view resize.
Views: BrowserView is responsible for the actual layout and reserved contents area update.
Mac: TabContentsController now manages all TabContents views in the main browser window to solve
two problems, first to prevent contents flickering during tab change not only for the page,
but for the sidebar and devtools contents too and, second, to monitor contents view frame changes
and update reserved contents area accordingly.
BUG=51084
TEST=All tests should pass, this is a refactoring CL.
Review URL: http://codereview.chromium.org/3547008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 4 |
4 files changed, 0 insertions, 16 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 2a8c4df..165f23a 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2939,12 +2939,6 @@ void TabContents::OnCrossSiteResponse(int new_render_process_host_id, new_request_id); } -gfx::Rect TabContents::GetRootWindowResizerRect() const { - if (delegate()) - return delegate()->GetRootWindowResizerRect(); - return gfx::Rect(); -} - void TabContents::RendererUnresponsive(RenderViewHost* rvh, bool is_during_unload) { if (is_during_unload) { diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 937fe00..ec3a77a 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -39,7 +39,6 @@ #include "chrome/common/renderer_preferences.h" #include "chrome/common/translate_errors.h" #include "gfx/native_widget_types.h" -#include "gfx/rect.h" #include "net/base/load_states.h" #include "webkit/glue/dom_operations.h" @@ -999,7 +998,6 @@ class TabContents : public PageNavigator, virtual void OnJSOutOfMemory(); virtual void OnCrossSiteResponse(int new_render_process_host_id, int new_request_id); - virtual gfx::Rect GetRootWindowResizerRect() const; virtual void RendererUnresponsive(RenderViewHost* render_view_host, bool is_during_unload); virtual void RendererResponsive(RenderViewHost* render_view_host); diff --git a/chrome/browser/tab_contents/tab_contents_delegate.cc b/chrome/browser/tab_contents/tab_contents_delegate.cc index 25fd157..ddbfa99 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.cc +++ b/chrome/browser/tab_contents/tab_contents_delegate.cc @@ -41,10 +41,6 @@ bool TabContentsDelegate::CanReloadContents(TabContents* source) const { return true; } -gfx::Rect TabContentsDelegate::GetRootWindowResizerRect() const { - return gfx::Rect(); -} - void TabContentsDelegate::ShowHtmlDialog(HtmlDialogUIDelegate* delegate, gfx::NativeWindow parent_window) { } diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index 63ef115..58497d5 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -147,10 +147,6 @@ class TabContentsDelegate : public AutomationResourceRoutingDelegate { // Reloading can be disabled e. g. for the DevTools window. virtual bool CanReloadContents(TabContents* source) const; - // Return the rect where to display the resize corner, if any, otherwise - // an empty rect. - virtual gfx::Rect GetRootWindowResizerRect() const; - // Show a dialog with HTML content. |delegate| contains a pointer to the // delegate who knows how to display the dialog (which file URL and JSON // string input to use during initialization). |parent_window| is the window |