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

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, 5 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 <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // the animations are running slowly and this function is called on 878 // the animations are running slowly and this function is called on
879 // a timer through LoadingAnimationCallback. 879 // a timer through LoadingAnimationCallback.
880 titlebar_->UpdateThrobber(web_contents); 880 titlebar_->UpdateThrobber(web_contents);
881 } 881 }
882 } 882 }
883 883
884 void BrowserWindowGtk::SetStarredState(bool is_starred) { 884 void BrowserWindowGtk::SetStarredState(bool is_starred) {
885 toolbar_->GetLocationBarView()->SetStarred(is_starred); 885 toolbar_->GetLocationBarView()->SetStarred(is_starred);
886 } 886 }
887 887
888 void BrowserWindowGtk::SetZoomIconState(ZoomController::ZoomIconState state) { 888 void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) {
889 toolbar_->GetLocationBarView()->SetZoomIconState(state); 889 toolbar_->GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble);
890 }
891
892 void BrowserWindowGtk::SetZoomIconTooltipPercent(int zoom_percent) {
893 toolbar_->GetLocationBarView()->SetZoomIconTooltipPercent(zoom_percent);
894 }
895
896 void BrowserWindowGtk::ShowZoomBubble(int zoom_percent) {
897 toolbar_->GetLocationBarView()->ShowZoomBubble(zoom_percent);
898 } 890 }
899 891
900 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const { 892 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const {
901 return restored_bounds_; 893 return restored_bounds_;
902 } 894 }
903 895
904 gfx::Rect BrowserWindowGtk::GetBounds() const { 896 gfx::Rect BrowserWindowGtk::GetBounds() const {
905 return bounds_; 897 return bounds_;
906 } 898 }
907 899
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 wm_type == ui::WM_OPENBOX || 2590 wm_type == ui::WM_OPENBOX ||
2599 wm_type == ui::WM_XFWM4); 2591 wm_type == ui::WM_XFWM4);
2600 } 2592 }
2601 2593
2602 // static 2594 // static
2603 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2595 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2604 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2596 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2605 browser_window_gtk->Init(); 2597 browser_window_gtk->Init();
2606 return browser_window_gtk; 2598 return browser_window_gtk;
2607 } 2599 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698