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 <memory> | 15 #include <memory> |
16 | 16 |
17 #include "base/mac/scoped_nsobject.h" | 17 #include "base/mac/scoped_nsobject.h" |
18 #include "chrome/browser/extensions/browser_extension_window_controller.h" | 18 #include "chrome/browser/extensions/browser_extension_window_controller.h" |
19 #include "chrome/browser/translate/chrome_translate_client.h" | 19 #include "chrome/browser/translate/chrome_translate_client.h" |
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" | 21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_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 "chrome/browser/ui/exclusive_access/exclusive_access_context.h" |
27 #include "chrome/browser/ui/tabs/tab_utils.h" | 28 #include "chrome/browser/ui/tabs/tab_utils.h" |
28 #include "components/translate/core/common/translate_errors.h" | 29 #include "components/translate/core/common/translate_errors.h" |
29 #include "ui/base/accelerators/accelerator_manager.h" | 30 #include "ui/base/accelerators/accelerator_manager.h" |
30 #include "ui/gfx/geometry/rect.h" | 31 #include "ui/gfx/geometry/rect.h" |
31 | 32 |
32 @class AvatarBaseController; | 33 @class AvatarBaseController; |
33 class BookmarkBubbleObserverCocoa; | 34 class BookmarkBubbleObserverCocoa; |
34 class Browser; | 35 class Browser; |
35 class BrowserWindow; | 36 class BrowserWindow; |
36 class BrowserWindowCocoa; | 37 class BrowserWindowCocoa; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 // Methods having to do with fullscreen and presentation mode. | 530 // Methods having to do with fullscreen and presentation mode. |
530 @interface BrowserWindowController(Fullscreen) | 531 @interface BrowserWindowController(Fullscreen) |
531 | 532 |
532 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter | 533 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter |
533 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. | 534 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. |
534 - (void)handleLionToggleFullscreen; | 535 - (void)handleLionToggleFullscreen; |
535 | 536 |
536 // Enters Browser AppKit Fullscreen. | 537 // Enters Browser AppKit Fullscreen. |
537 - (void)enterBrowserFullscreen; | 538 - (void)enterBrowserFullscreen; |
538 | 539 |
539 // Adds or removes the tab strip and toolbar from the current window. The | 540 // Updates the UI for tab fullscreen by adding or removing the tab strip and |
540 // window must be in immersive or AppKit Fullscreen. | 541 // toolbar from the current window. The window must already be in fullscreen. |
541 - (void)updateFullscreenWithToolbar:(BOOL)withToolbar; | 542 - (void)updateUIForTabFullscreen: |
| 543 (ExclusiveAccessContext::TabFullscreenState)state; |
542 | 544 |
543 // Exits extension fullscreen if we're currently in the mode. Returns YES | 545 // Exits extension fullscreen if we're currently in the mode. Returns YES |
544 // if we exited fullscreen. | 546 // if we exited fullscreen. |
545 - (BOOL)exitExtensionFullscreenIfPossible; | 547 - (BOOL)exitExtensionFullscreenIfPossible; |
546 | 548 |
547 // Updates the contents of the fullscreen exit bubble with |url| and | 549 // Updates the contents of the fullscreen exit bubble with |url| and |
548 // |bubbleType|. | 550 // |bubbleType|. |
549 - (void)updateFullscreenExitBubble; | 551 - (void)updateFullscreenExitBubble; |
550 | 552 |
551 // Set the toolbar's visibility in fullscreen mode. | 553 // Set the toolbar's visibility in fullscreen mode. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 // Returns the active tab contents controller's |blockFullscreenResize_| flag. | 649 // Returns the active tab contents controller's |blockFullscreenResize_| flag. |
648 - (BOOL)isActiveTabContentsControllerResizeBlocked; | 650 - (BOOL)isActiveTabContentsControllerResizeBlocked; |
649 | 651 |
650 // Returns the presentation mode controller. | 652 // Returns the presentation mode controller. |
651 - (PresentationModeController*)presentationModeController; | 653 - (PresentationModeController*)presentationModeController; |
652 | 654 |
653 @end // @interface BrowserWindowController (TestingAPI) | 655 @end // @interface BrowserWindowController (TestingAPI) |
654 | 656 |
655 | 657 |
656 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 658 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |