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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.h

Issue 15932008: Add managed user avatar menu for mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT. Created 7 years, 6 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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
7 7
8 // A class acting as the Objective-C controller for the Browser 8 // A class acting as the Objective-C controller for the Browser
9 // object. Handles interactions between Cocoa and the cross-platform 9 // object. Handles interactions between Cocoa and the cross-platform
10 // code. Each window has a single toolbar and, by virtue of being a 10 // code. Each window has a single toolbar and, by virtue of being a
11 // TabWindowController, a tab strip along the top. 11 // TabWindowController, a tab strip along the top.
12 12
13 #import <Cocoa/Cocoa.h> 13 #import <Cocoa/Cocoa.h>
14 14
15 #include "base/memory/scoped_nsobject.h" 15 #include "base/memory/scoped_nsobject.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
19 #import "chrome/browser/ui/cocoa/browser_command_executor.h" 19 #import "chrome/browser/ui/cocoa/browser_command_executor.h"
20 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" 20 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h"
21 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 21 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
22 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 22 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
23 #import "chrome/browser/ui/cocoa/themed_window.h" 23 #import "chrome/browser/ui/cocoa/themed_window.h"
24 #import "chrome/browser/ui/cocoa/url_drop_target.h" 24 #import "chrome/browser/ui/cocoa/url_drop_target.h"
25 #import "chrome/browser/ui/cocoa/view_resizer.h" 25 #import "chrome/browser/ui/cocoa/view_resizer.h"
26 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
27 27
28 @class AvatarButtonController; 28 @class AvatarButtonController;
29 @class AvatarLabelController;
29 class Browser; 30 class Browser;
30 class BrowserWindow; 31 class BrowserWindow;
31 class BrowserWindowCocoa; 32 class BrowserWindowCocoa;
32 @class ChromeToMobileBubbleController; 33 @class ChromeToMobileBubbleController;
33 @class DevToolsController; 34 @class DevToolsController;
34 @class DownloadShelfController; 35 @class DownloadShelfController;
35 class ExtensionKeybindingRegistryCocoa; 36 class ExtensionKeybindingRegistryCocoa;
36 @class FindBarCocoaController; 37 @class FindBarCocoaController;
37 @class FullscreenWindow; 38 @class FullscreenWindow;
38 @class InfoBarContainerController; 39 @class InfoBarContainerController;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // The raw accumulated zoom value and the actual zoom increments made for an 102 // The raw accumulated zoom value and the actual zoom increments made for an
102 // an in-progress pinch gesture. 103 // an in-progress pinch gesture.
103 CGFloat totalMagnifyGestureAmount_; 104 CGFloat totalMagnifyGestureAmount_;
104 NSInteger currentZoomStepDelta_; 105 NSInteger currentZoomStepDelta_;
105 106
106 // The view controller that manages the incognito badge or the multi-profile 107 // The view controller that manages the incognito badge or the multi-profile
107 // avatar icon. The view is always in the view hierarchy, but will be hidden 108 // avatar icon. The view is always in the view hierarchy, but will be hidden
108 // unless it's appropriate to show it. 109 // unless it's appropriate to show it.
109 scoped_nsobject<AvatarButtonController> avatarButtonController_; 110 scoped_nsobject<AvatarButtonController> avatarButtonController_;
110 111
112 // The label that is displayed on the side of the avatar icon of a managed
113 // user.
114 scoped_nsobject<AvatarLabelController> avatarLabelController_;
115
111 // Lazily created view which draws the background for the floating set of bars 116 // Lazily created view which draws the background for the floating set of bars
112 // in presentation mode (for window types having a floating bar; it remains 117 // in presentation mode (for window types having a floating bar; it remains
113 // nil for those which don't). 118 // nil for those which don't).
114 scoped_nsobject<NSView> floatingBarBackingView_; 119 scoped_nsobject<NSView> floatingBarBackingView_;
115 120
116 // The borderless window used in fullscreen mode. Lion reuses the original 121 // The borderless window used in fullscreen mode. Lion reuses the original
117 // window in fullscreen mode, so this is always nil on Lion. 122 // window in fullscreen mode, so this is always nil on Lion.
118 scoped_nsobject<NSWindow> fullscreenWindow_; 123 scoped_nsobject<NSWindow> fullscreenWindow_;
119 124
120 // Tracks whether presentation mode was entered from fullscreen mode or 125 // Tracks whether presentation mode was entered from fullscreen mode or
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 223
219 // Returns a weak pointer to the overlayable contents controller. 224 // Returns a weak pointer to the overlayable contents controller.
220 - (OverlayableContentsController*)overlayableContentsController; 225 - (OverlayableContentsController*)overlayableContentsController;
221 226
222 // Access the Profile object that backs this Browser. 227 // Access the Profile object that backs this Browser.
223 - (Profile*)profile; 228 - (Profile*)profile;
224 229
225 // Access the avatar button controller. 230 // Access the avatar button controller.
226 - (AvatarButtonController*)avatarButtonController; 231 - (AvatarButtonController*)avatarButtonController;
227 232
233 // Access the avatar label.
234 - (AvatarLabelController*)avatarLabelController;
235
228 // Updates the toolbar (and transitively the location bar) with the states of 236 // Updates the toolbar (and transitively the location bar) with the states of
229 // the specified |tab|. If |shouldRestore| is true, we're switching 237 // the specified |tab|. If |shouldRestore| is true, we're switching
230 // (back?) to this tab and should restore any previous location bar state 238 // (back?) to this tab and should restore any previous location bar state
231 // (such as user editing) as well. 239 // (such as user editing) as well.
232 - (void)updateToolbarWithContents:(content::WebContents*)tab 240 - (void)updateToolbarWithContents:(content::WebContents*)tab
233 shouldRestoreState:(BOOL)shouldRestore; 241 shouldRestoreState:(BOOL)shouldRestore;
234 242
235 // Sets whether or not the current page in the frontmost tab is bookmarked. 243 // Sets whether or not the current page in the frontmost tab is bookmarked.
236 - (void)setStarredState:(BOOL)isStarred; 244 - (void)setStarredState:(BOOL)isStarred;
237 245
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 // |source| rect doesn't fit into |target|. 491 // |source| rect doesn't fit into |target|.
484 - (NSSize)overflowFrom:(NSRect)source 492 - (NSSize)overflowFrom:(NSRect)source
485 to:(NSRect)target; 493 to:(NSRect)target;
486 494
487 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. 495 // The fullscreen exit bubble controller, or nil if the bubble isn't showing.
488 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; 496 - (FullscreenExitBubbleController*)fullscreenExitBubbleController;
489 @end // @interface BrowserWindowController (TestingAPI) 497 @end // @interface BrowserWindowController (TestingAPI)
490 498
491 499
492 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 500 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698