Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // the animations are running slowly and this function is called on 833 // the animations are running slowly and this function is called on
834 // a timer through LoadingAnimationCallback. 834 // a timer through LoadingAnimationCallback.
835 titlebar_->UpdateThrobber(web_contents); 835 titlebar_->UpdateThrobber(web_contents);
836 } 836 }
837 } 837 }
838 838
839 void BrowserWindowGtk::SetStarredState(bool is_starred) { 839 void BrowserWindowGtk::SetStarredState(bool is_starred) {
840 toolbar_->GetLocationBarView()->SetStarred(is_starred); 840 toolbar_->GetLocationBarView()->SetStarred(is_starred);
841 } 841 }
842 842
843 void BrowserWindowGtk::SetZoomIconState(ZoomController::ZoomIconState state) { 843 void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) {
844 toolbar_->GetLocationBarView()->SetZoomIconState(state); 844 // TODO(dbeam): make sure |can_show_bubble| is forced to false when the wrench
845 } 845 // menu is showing.
846 846 toolbar_->GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble);
847 void BrowserWindowGtk::SetZoomIconTooltipPercent(int zoom_percent) {
848 toolbar_->GetLocationBarView()->SetZoomIconTooltipPercent(zoom_percent);
849 }
850
851 void BrowserWindowGtk::ShowZoomBubble(int zoom_percent) {
852 toolbar_->GetLocationBarView()->ShowZoomBubble(zoom_percent);
853 } 847 }
854 848
855 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const { 849 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const {
856 return restored_bounds_; 850 return restored_bounds_;
857 } 851 }
858 852
859 gfx::Rect BrowserWindowGtk::GetBounds() const { 853 gfx::Rect BrowserWindowGtk::GetBounds() const {
860 return bounds_; 854 return bounds_;
861 } 855 }
862 856
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 wm_type == ui::WM_OPENBOX || 2546 wm_type == ui::WM_OPENBOX ||
2553 wm_type == ui::WM_XFWM4); 2547 wm_type == ui::WM_XFWM4);
2554 } 2548 }
2555 2549
2556 // static 2550 // static
2557 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2551 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2558 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2552 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2559 browser_window_gtk->Init(); 2553 browser_window_gtk->Init();
2560 return browser_window_gtk; 2554 return browser_window_gtk;
2561 } 2555 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698