diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-29 20:02:05 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-29 20:02:05 +0000 |
commit | dae12ee6df766d9cd3af83277f6e8d0f0e9bb20d (patch) | |
tree | 65f01afe493e3aec73488c4867c60f379b73270e /chrome/browser | |
parent | c91d9ced6258ada125bd9fb042ba795272a91fb6 (diff) | |
download | chromium_src-dae12ee6df766d9cd3af83277f6e8d0f0e9bb20d.zip chromium_src-dae12ee6df766d9cd3af83277f6e8d0f0e9bb20d.tar.gz chromium_src-dae12ee6df766d9cd3af83277f6e8d0f0e9bb20d.tar.bz2 |
Landing Thiago Farina's CL.
See http://codereview.chromium.org/159186
Renaming GetNormalBounds to GetRestoredBounds from browser_window.h.
BUG=None
TEST=None
TBR=tfarina
Review URL: http://codereview.chromium.org/160337
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser.cc | 4 | ||||
-rw-r--r-- | chrome/browser/browser_window.h | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.h | 2 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.mm | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.h | 2 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/panel_controller.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_overview_drag_controller.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_overview_message_listener.cc | 4 | ||||
-rw-r--r-- | chrome/browser/window_sizer.cc | 2 |
14 files changed, 18 insertions, 19 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index ab11f37..6c9c787 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1508,8 +1508,8 @@ void Browser::DuplicateContentsAt(int index) { // Preserve the size of the original window. The new window has already // been given an offset by the OS, so we shouldn't copy the old bounds. BrowserWindow* new_window = browser->window(); - new_window->SetBounds(gfx::Rect(new_window->GetNormalBounds().origin(), - window()->GetNormalBounds().size())); + new_window->SetBounds(gfx::Rect(new_window->GetRestoredBounds().origin(), + window()->GetRestoredBounds().size())); // We need to show the browser now. Otherwise ContainerWin assumes the // TabContents is invisible and won't size it. diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index 234b4411..041f471 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -94,10 +94,9 @@ class BrowserWindow { // Sets the starred state for the current tab. virtual void SetStarredState(bool is_starred) = 0; - // TODO(beng): RENAME (GetRestoredBounds) // Returns the nonmaximized bounds of the frame (even if the frame is // currently maximized or minimized) in terms of the screen coordinates. - virtual gfx::Rect GetNormalBounds() const = 0; + virtual gfx::Rect GetRestoredBounds() const = 0; // TODO(beng): REMOVE? // Returns true if the frame is maximized (aka zoomed). diff --git a/chrome/browser/cocoa/browser_window_cocoa.h b/chrome/browser/cocoa/browser_window_cocoa.h index a20a12a..688b658 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.h +++ b/chrome/browser/cocoa/browser_window_cocoa.h @@ -43,7 +43,7 @@ class BrowserWindowCocoa : public BrowserWindow, virtual void FocusDevTools(); virtual void UpdateLoadingAnimations(bool should_animate); virtual void SetStarredState(bool is_starred); - virtual gfx::Rect GetNormalBounds() const; + virtual gfx::Rect GetRestoredBounds() const; virtual bool IsMaximized() const; virtual void SetFullscreen(bool fullscreen); virtual bool IsFullscreen() const; diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm index 9494e20..fcaa960 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/cocoa/browser_window_cocoa.mm @@ -116,7 +116,7 @@ void BrowserWindowCocoa::SetStarredState(bool is_starred) { [controller_ setStarredState:is_starred ? YES : NO]; } -gfx::Rect BrowserWindowCocoa::GetNormalBounds() const { +gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { // TODO(pinkerton): not sure if we can get the non-zoomed bounds, or if it // really matters. We may want to let Cocoa handle all this for us. NSRect frame = [window_ frame]; diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 93818be..a51a9a2 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -290,7 +290,7 @@ bool UpdateWindowFunction::RunImpl() { if (!browser) return false; - gfx::Rect bounds = browser->window()->GetNormalBounds(); + gfx::Rect bounds = browser->window()->GetRestoredBounds(); // Any part of the bounds can optionally be set by the caller. int bounds_val; if (update_props->HasKey(keys::kLeftKey)) { @@ -672,7 +672,7 @@ static DictionaryValue* CreateWindowValue(Browser* browser, browser)); result->SetBoolean(keys::kFocusedKey, browser->window()->IsActive()); - gfx::Rect bounds = browser->window()->GetNormalBounds(); + gfx::Rect bounds = browser->window()->GetRestoredBounds(); // TODO(rafaelw): zIndex ? result->SetInteger(keys::kLeftKey, bounds.x()); diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 05e9ee7..f818aa0 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -661,7 +661,7 @@ void BrowserWindowGtk::SetStarredState(bool is_starred) { toolbar_->star()->SetStarred(is_starred); } -gfx::Rect BrowserWindowGtk::GetNormalBounds() const { +gfx::Rect BrowserWindowGtk::GetRestoredBounds() const { return bounds_; } diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h index c494d68..3df7d40 100644 --- a/chrome/browser/gtk/browser_window_gtk.h +++ b/chrome/browser/gtk/browser_window_gtk.h @@ -69,7 +69,7 @@ class BrowserWindowGtk : public BrowserWindow, virtual void FocusDevTools(); virtual void UpdateLoadingAnimations(bool should_animate); virtual void SetStarredState(bool is_starred); - virtual gfx::Rect GetNormalBounds() const; + virtual gfx::Rect GetRestoredBounds() const; virtual bool IsMaximized() const; virtual void SetFullscreen(bool fullscreen); virtual bool IsFullscreen() const; diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index 0a9c630..4e6725a 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -963,7 +963,7 @@ void SessionService::BuildCommandsForBrowser( commands->push_back( CreateSetWindowBoundsCommand(browser->session_id(), - browser->window()->GetNormalBounds(), + browser->window()->GetRestoredBounds(), browser->window()->IsMaximized())); commands->push_back(CreateSetWindowTypeCommand( diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index b2f9da8..1de6e48 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -695,7 +695,7 @@ void BrowserView::SetStarredState(bool is_starred) { toolbar_->star_button()->SetToggled(is_starred); } -gfx::Rect BrowserView::GetNormalBounds() const { +gfx::Rect BrowserView::GetRestoredBounds() const { return frame_->GetWindow()->GetNormalBounds(); } diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h index abccd5e..3d0b2b0 100644 --- a/chrome/browser/views/frame/browser_view.h +++ b/chrome/browser/views/frame/browser_view.h @@ -213,7 +213,7 @@ class BrowserView : public BrowserWindow, virtual void FocusDevTools(); virtual void UpdateLoadingAnimations(bool should_animate); virtual void SetStarredState(bool is_starred); - virtual gfx::Rect GetNormalBounds() const; + virtual gfx::Rect GetRestoredBounds() const; virtual bool IsMaximized() const; virtual void SetFullscreen(bool fullscreen); virtual bool IsFullscreen() const; diff --git a/chrome/browser/views/panel_controller.cc b/chrome/browser/views/panel_controller.cc index efcd9d3..d34af21 100644 --- a/chrome/browser/views/panel_controller.cc +++ b/chrome/browser/views/panel_controller.cc @@ -71,7 +71,7 @@ PanelController::PanelController(BrowserWindowGtk* browser_window) dragging_(false) { title_window_ = new views::WidgetGtk(views::WidgetGtk::TYPE_WINDOW); gfx::Rect title_bounds( - 0, 0, browser_window->GetNormalBounds().width(), kTitleHeight); + 0, 0, browser_window->GetRestoredBounds().width(), kTitleHeight); title_window_->Init(NULL, title_bounds); title_ = title_window_->GetNativeView(); title_xid_ = x11_util::GetX11WindowFromGtkWidget(title_); diff --git a/chrome/browser/views/tabs/tab_overview_drag_controller.cc b/chrome/browser/views/tabs/tab_overview_drag_controller.cc index 1fef35d6..df9b73b 100644 --- a/chrome/browser/views/tabs/tab_overview_drag_controller.cc +++ b/chrome/browser/views/tabs/tab_overview_drag_controller.cc @@ -77,7 +77,7 @@ bool TabOverviewDragController::Configure(const gfx::Point& location) { if (controller_->browser()) { browser_window_size_ = - controller_->browser()->window()->GetNormalBounds().size(); + controller_->browser()->window()->GetRestoredBounds().size(); } return true; @@ -115,7 +115,7 @@ void TabOverviewDragController::CommitDrag(const gfx::Point& location) { } else { DropTab(location); } - } else if (!dragging_ ) { + } else if (!dragging_) { // We haven't started dragging. Tell the controller to focus the browser. controller_->FocusBrowser(); } else { diff --git a/chrome/browser/views/tabs/tab_overview_message_listener.cc b/chrome/browser/views/tabs/tab_overview_message_listener.cc index d0b6665..e063f5c 100644 --- a/chrome/browser/views/tabs/tab_overview_message_listener.cc +++ b/chrome/browser/views/tabs/tab_overview_message_listener.cc @@ -91,7 +91,7 @@ void TabOverviewMessageListener::ProcessMessage( } else if (BrowserList::size() > 0) { Browser* browser = *BrowserList::begin(); controller_.reset(new TabOverviewController( - browser->window()->GetNormalBounds().origin())); + browser->window()->GetRestoredBounds().origin())); new_browser_window_.reset( new NewBrowserWindowWidget(browser->profile())); } @@ -136,7 +136,7 @@ void TabOverviewMessageListener::ShowOverview(Browser* browser, int horizontal_center) { if (!controller_.get()) { controller_.reset(new TabOverviewController( - browser->window()->GetNormalBounds().origin())); + browser->window()->GetRestoredBounds().origin())); } controller_->SetBrowser(browser, horizontal_center); controller_->Show(); diff --git a/chrome/browser/window_sizer.cc b/chrome/browser/window_sizer.cc index 519a300..1438e32 100644 --- a/chrome/browser/window_sizer.cc +++ b/chrome/browser/window_sizer.cc @@ -91,7 +91,7 @@ class DefaultStateProvider : public WindowSizer::StateProvider { } if (window) { - *bounds = window->GetNormalBounds(); + *bounds = window->GetRestoredBounds(); return true; } |