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

Side by Side Diff: chrome/browser/ui/zoom/zoom_controller.h

Issue 10979019: [gtk] fix zoom bubble showing up on wrong window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/api/prefs/pref_member.h" 10 #include "chrome/browser/api/prefs/pref_member.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 virtual void DidNavigateMainFrame( 45 virtual void DidNavigateMainFrame(
46 const content::LoadCommittedDetails& details, 46 const content::LoadCommittedDetails& details,
47 const content::FrameNavigateParams& params) OVERRIDE; 47 const content::FrameNavigateParams& params) OVERRIDE;
48 48
49 // content::NotificationObserver overrides: 49 // content::NotificationObserver overrides:
50 virtual void Observe(int type, 50 virtual void Observe(int type,
51 const content::NotificationSource& source, 51 const content::NotificationSource& source,
52 const content::NotificationDetails& details) OVERRIDE; 52 const content::NotificationDetails& details) OVERRIDE;
53 53
54 // Updates the zoom icon and zoom percentage based on current values and 54 // Updates the zoom icon and zoom percentage based on current values and
55 // notifies the observer if changes have occurred. |can_show_bubble| will be 55 // notifies the observer if changes have occurred. |host| may be empty,
56 // true only if the active window changes the zoom on the current page (i.e., 56 // meaning the change should apply to ~all sites. If it is not empty, the
57 // inactive window zoom changes, creating a new tab/window, or shifting 57 // change only affects sites with the given host.
58 // between tabs/windows, although they may involve a change in the zoom, 58 void UpdateState(const std::string& host);
59 // should not trigger showing a bubble).
60 void UpdateState(bool can_show_bubble);
61 59
62 // The current zoom percentage. 60 // The current zoom percentage.
63 int zoom_percent_; 61 int zoom_percent_;
64 62
65 content::NotificationRegistrar registrar_; 63 content::NotificationRegistrar registrar_;
66 64
67 // Used to access the default zoom level preference. 65 // Used to access the default zoom level preference.
68 DoublePrefMember default_zoom_level_; 66 DoublePrefMember default_zoom_level_;
69 67
70 // Observer receiving notifications on state changes. 68 // Observer receiving notifications on state changes.
71 ZoomObserver* observer_; 69 ZoomObserver* observer_;
72 70
73 DISALLOW_COPY_AND_ASSIGN(ZoomController); 71 DISALLOW_COPY_AND_ASSIGN(ZoomController);
74 }; 72 };
75 73
76 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 74 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698