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 |
| 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/mac/scoped_nsobject.h" | 15 #include "base/mac/scoped_nsobject.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "chrome/browser/translate/chrome_translate_client.h" | 17 #include "chrome/browser/translate/chrome_translate_client.h" |
| 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
| 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" |
| 20 #import "chrome/browser/ui/cocoa/browser_command_executor.h" | 20 #import "chrome/browser/ui/cocoa/browser_command_executor.h" |
| 21 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" | 21 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" |
| 22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
| 23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
| 24 #import "chrome/browser/ui/cocoa/themed_window.h" | 24 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 25 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 25 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
| 26 #import "chrome/browser/ui/cocoa/view_resizer.h" | 26 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 27 #include "components/translate/core/common/translate_errors.h" | 27 #include "components/translate/core/common/translate_errors.h" |
| 28 #include "ui/base/accelerators/accelerator_manager.h" | |
| 28 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/rect.h" |
| 29 | 30 |
| 30 @class AvatarBaseController; | 31 @class AvatarBaseController; |
| 31 class Browser; | 32 class Browser; |
| 32 class BrowserWindow; | 33 class BrowserWindow; |
| 33 class BrowserWindowCocoa; | 34 class BrowserWindowCocoa; |
| 34 @class DevToolsController; | 35 @class DevToolsController; |
| 35 @class DownloadShelfController; | 36 @class DownloadShelfController; |
| 36 class ExtensionKeybindingRegistryCocoa; | 37 class ExtensionKeybindingRegistryCocoa; |
| 37 @class FindBarCocoaController; | 38 @class FindBarCocoaController; |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 // The user changed the theme. | 302 // The user changed the theme. |
| 302 - (void)userChangedTheme; | 303 - (void)userChangedTheme; |
| 303 | 304 |
| 304 // Executes the command in the context of the current browser. | 305 // Executes the command in the context of the current browser. |
| 305 // |command| is an integer value containing one of the constants defined in the | 306 // |command| is an integer value containing one of the constants defined in the |
| 306 // "chrome/app/chrome_command_ids.h" file. | 307 // "chrome/app/chrome_command_ids.h" file. |
| 307 - (void)executeCommand:(int)command; | 308 - (void)executeCommand:(int)command; |
| 308 | 309 |
| 309 // Consults the Command Registry to see if this |event| needs to be handled as | 310 // Consults the Command Registry to see if this |event| needs to be handled as |
| 310 // an extension command and returns YES if so (NO otherwise). | 311 // an extension command and returns YES if so (NO otherwise). |
| 311 - (BOOL)handledByExtensionCommand:(NSEvent*)event; | 312 // Only extensions with the given |priority| are considered. |
| 313 - (BOOL)handledByExtensionCommand:(NSEvent*)event | |
| 314 priority: | |
| 315 (ui::AcceleratorManager::HandlerPriority)priority; | |
|
Scott Hess - ex-Googler
2014/07/15 19:20:59
And here.
erikchen
2014/07/15 20:48:40
Done.
| |
| 312 | 316 |
| 313 // Delegate method for the status bubble to query its base frame. | 317 // Delegate method for the status bubble to query its base frame. |
| 314 - (NSRect)statusBubbleBaseFrame; | 318 - (NSRect)statusBubbleBaseFrame; |
| 315 | 319 |
| 316 // Show the bookmark bubble (e.g. user just clicked on the STAR) | 320 // Show the bookmark bubble (e.g. user just clicked on the STAR) |
| 317 - (void)showBookmarkBubbleForURL:(const GURL&)url | 321 - (void)showBookmarkBubbleForURL:(const GURL&)url |
| 318 alreadyBookmarked:(BOOL)alreadyBookmarked; | 322 alreadyBookmarked:(BOOL)alreadyBookmarked; |
| 319 | 323 |
| 320 // Show the translate bubble. | 324 // Show the translate bubble. |
| 321 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents | 325 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 532 // positioned relative to. | 536 // positioned relative to. |
| 533 - (NSRect)omniboxPopupAnchorRect; | 537 - (NSRect)omniboxPopupAnchorRect; |
| 534 | 538 |
| 535 // Force a layout of info bars. | 539 // Force a layout of info bars. |
| 536 - (void)layoutInfoBars; | 540 - (void)layoutInfoBars; |
| 537 | 541 |
| 538 @end // @interface BrowserWindowController (TestingAPI) | 542 @end // @interface BrowserWindowController (TestingAPI) |
| 539 | 543 |
| 540 | 544 |
| 541 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 545 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |