Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 #import "chrome/browser/ui/cocoa/view_resizer.h" | 27 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 28 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
| 29 | 29 |
| 30 @class AvatarButtonController; | 30 @class AvatarButtonController; |
| 31 class Browser; | 31 class Browser; |
| 32 class BrowserWindow; | 32 class BrowserWindow; |
| 33 class BrowserWindowCocoa; | 33 class BrowserWindowCocoa; |
| 34 @class ChromeToMobileBubbleController; | 34 @class ChromeToMobileBubbleController; |
| 35 @class DevToolsController; | 35 @class DevToolsController; |
| 36 @class DownloadShelfController; | 36 @class DownloadShelfController; |
| 37 class ExtensionKeybindingRegistryCocoa; | |
| 37 @class FindBarCocoaController; | 38 @class FindBarCocoaController; |
| 38 @class FullscreenWindow; | 39 @class FullscreenWindow; |
| 39 @class GTMWindowSheetController; | 40 @class GTMWindowSheetController; |
| 40 @class InfoBarContainerController; | 41 @class InfoBarContainerController; |
| 41 class LocationBarViewMac; | 42 class LocationBarViewMac; |
| 42 @class PresentationModeController; | 43 @class PresentationModeController; |
| 43 @class PreviewableContentsController; | 44 @class PreviewableContentsController; |
| 44 class StatusBubbleMac; | 45 class StatusBubbleMac; |
| 45 @class TabStripController; | 46 @class TabStripController; |
| 46 @class TabStripView; | 47 @class TabStripView; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 | 155 |
| 155 // Bar visibility locks and releases only result (when appropriate) in changes | 156 // Bar visibility locks and releases only result (when appropriate) in changes |
| 156 // in visible state when the following is |YES|. | 157 // in visible state when the following is |YES|. |
| 157 BOOL barVisibilityUpdatesEnabled_; | 158 BOOL barVisibilityUpdatesEnabled_; |
| 158 | 159 |
| 159 // When going fullscreen for a tab, we need to store the URL and the | 160 // When going fullscreen for a tab, we need to store the URL and the |
| 160 // fullscreen type, since we can't show the bubble until | 161 // fullscreen type, since we can't show the bubble until |
| 161 // -windowDidEnterFullScreen: gets called. | 162 // -windowDidEnterFullScreen: gets called. |
| 162 GURL fullscreenUrl_; | 163 GURL fullscreenUrl_; |
| 163 FullscreenExitBubbleType fullscreenBubbleType_; | 164 FullscreenExitBubbleType fullscreenBubbleType_; |
| 165 | |
| 166 // The Extension Command Registry used to determine which keyboard events to | |
| 167 // handle. | |
| 168 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; | |
| 164 } | 169 } |
| 165 | 170 |
| 166 // A convenience class method which gets the |BrowserWindowController| for a | 171 // A convenience class method which gets the |BrowserWindowController| for a |
| 167 // given window. This method returns nil if no window in the chain has a BWC. | 172 // given window. This method returns nil if no window in the chain has a BWC. |
| 168 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 173 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
| 169 | 174 |
| 170 // A convenience class method which gets the |BrowserWindowController| for a | 175 // A convenience class method which gets the |BrowserWindowController| for a |
| 171 // given view. This is the controller for the window containing |view|, if it | 176 // given view. This is the controller for the window containing |view|, if it |
| 172 // is a BWC, or the first controller in the parent-window chain that is a | 177 // is a BWC, or the first controller in the parent-window chain that is a |
| 173 // BWC. This method returns nil if no window in the chain has a BWC. | 178 // BWC. This method returns nil if no window in the chain has a BWC. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController; | 270 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController; |
| 266 | 271 |
| 267 // The user changed the theme. | 272 // The user changed the theme. |
| 268 - (void)userChangedTheme; | 273 - (void)userChangedTheme; |
| 269 | 274 |
| 270 // Executes the command in the context of the current browser. | 275 // Executes the command in the context of the current browser. |
| 271 // |command| is an integer value containing one of the constants defined in the | 276 // |command| is an integer value containing one of the constants defined in the |
| 272 // "chrome/app/chrome_command_ids.h" file. | 277 // "chrome/app/chrome_command_ids.h" file. |
| 273 - (void)executeCommand:(int)command; | 278 - (void)executeCommand:(int)command; |
| 274 | 279 |
| 280 // Consults the Command Registry to see if this |event| needs to be handled as | |
| 281 // an extension command and returns YES if so (NO otherwise). | |
| 282 - (BOOL)HandledByExtensionCommand:(NSEvent*)event; | |
|
Scott Hess - ex-Googler
2012/08/16 04:56:36
Just in case you missed it, -handledByExtensionCom
| |
| 283 | |
| 275 // Delegate method for the status bubble to query its base frame. | 284 // Delegate method for the status bubble to query its base frame. |
| 276 - (NSRect)statusBubbleBaseFrame; | 285 - (NSRect)statusBubbleBaseFrame; |
| 277 | 286 |
| 278 // Show the bookmark bubble (e.g. user just clicked on the STAR) | 287 // Show the bookmark bubble (e.g. user just clicked on the STAR) |
| 279 - (void)showBookmarkBubbleForURL:(const GURL&)url | 288 - (void)showBookmarkBubbleForURL:(const GURL&)url |
| 280 alreadyBookmarked:(BOOL)alreadyBookmarked; | 289 alreadyBookmarked:(BOOL)alreadyBookmarked; |
| 281 | 290 |
| 282 // Show the Chrome To Mobile bubble (e.g. user just clicked on the icon) | 291 // Show the Chrome To Mobile bubble (e.g. user just clicked on the icon) |
| 283 - (void)showChromeToMobileBubble; | 292 - (void)showChromeToMobileBubble; |
| 284 | 293 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 // |source| rect doesn't fit into |target|. | 482 // |source| rect doesn't fit into |target|. |
| 474 - (NSSize)overflowFrom:(NSRect)source | 483 - (NSSize)overflowFrom:(NSRect)source |
| 475 to:(NSRect)target; | 484 to:(NSRect)target; |
| 476 | 485 |
| 477 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. | 486 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. |
| 478 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; | 487 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; |
| 479 @end // @interface BrowserWindowController (TestingAPI) | 488 @end // @interface BrowserWindowController (TestingAPI) |
| 480 | 489 |
| 481 | 490 |
| 482 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 491 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |