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

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

Issue 1250403002: [Mac] Move UI item validation to UserInterfaceItemCommandHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@commandexecute
Patch Set: Properly release |commandHandler|. Created 5 years, 3 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
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
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 @class TranslateBubbleController; 51 @class TranslateBubbleController;
52 52
53 namespace content { 53 namespace content {
54 class WebContents; 54 class WebContents;
55 } 55 }
56 56
57 namespace extensions { 57 namespace extensions {
58 class Command; 58 class Command;
59 } 59 }
60 60
61 @interface BrowserWindowController : 61 @interface BrowserWindowController
62 TabWindowController<NSUserInterfaceValidations, 62 : TabWindowController<BookmarkBarControllerDelegate,
63 BookmarkBarControllerDelegate, 63 ViewResizer,
64 ViewResizer, 64 TabStripControllerDelegate> {
65 TabStripControllerDelegate> {
66 @private 65 @private
67 // The ordering of these members is important as it determines the order in 66 // The ordering of these members is important as it determines the order in
68 // which they are destroyed. |browser_| needs to be destroyed last as most of 67 // which they are destroyed. |browser_| needs to be destroyed last as most of
69 // the other objects hold weak references to it or things it owns 68 // the other objects hold weak references to it or things it owns
70 // (tab/toolbar/bookmark models, profiles, etc). 69 // (tab/toolbar/bookmark models, profiles, etc).
71 scoped_ptr<Browser> browser_; 70 scoped_ptr<Browser> browser_;
72 NSWindow* savedRegularWindow_; 71 NSWindow* savedRegularWindow_;
73 scoped_ptr<BrowserWindowCocoa> windowShim_; 72 scoped_ptr<BrowserWindowCocoa> windowShim_;
74 base::scoped_nsobject<ToolbarController> toolbarController_; 73 base::scoped_nsobject<ToolbarController> toolbarController_;
75 base::scoped_nsobject<TabStripController> tabStripController_; 74 base::scoped_nsobject<TabStripController> tabStripController_;
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // IsWindowFullscreenForTabOrPending() returns true. 491 // IsWindowFullscreenForTabOrPending() returns true.
493 // -- The corresponding URL will be the url of the web page. 492 // -- The corresponding URL will be the url of the web page.
494 493
495 // Methods having to do with fullscreen and presentation mode. 494 // Methods having to do with fullscreen and presentation mode.
496 @interface BrowserWindowController(Fullscreen) 495 @interface BrowserWindowController(Fullscreen)
497 496
498 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter 497 // Toggles fullscreen mode. Meant to be called by Lion windows when they enter
499 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. 498 // or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier.
500 - (void)handleLionToggleFullscreen; 499 - (void)handleLionToggleFullscreen;
501 500
502 // The title of the fullscreen menu item in the menu bar.
503 - (NSString*)titleForFullscreenMenuItem;
504
505 // Enters Browser/Appkit Fullscreen. 501 // Enters Browser/Appkit Fullscreen.
506 // If |withToolbar| is NO, the tab strip and toolbar are hidden 502 // If |withToolbar| is NO, the tab strip and toolbar are hidden
507 // (aka Presentation Mode). 503 // (aka Presentation Mode).
508 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar; 504 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar;
509 505
510 // Adds or removes the tab strip and toolbar from the current window. The 506 // Adds or removes the tab strip and toolbar from the current window. The
511 // window must be in immersive or AppKit Fullscreen. 507 // window must be in immersive or AppKit Fullscreen.
512 - (void)updateFullscreenWithToolbar:(BOOL)withToolbar; 508 - (void)updateFullscreenWithToolbar:(BOOL)withToolbar;
513 509
514 // Updates the contents of the fullscreen exit bubble with |url| and 510 // Updates the contents of the fullscreen exit bubble with |url| and
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; 604 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController;
609 605
610 // Gets the rect, in window base coordinates, that the omnibox popup should be 606 // Gets the rect, in window base coordinates, that the omnibox popup should be
611 // positioned relative to. 607 // positioned relative to.
612 - (NSRect)omniboxPopupAnchorRect; 608 - (NSRect)omniboxPopupAnchorRect;
613 609
614 @end // @interface BrowserWindowController (TestingAPI) 610 @end // @interface BrowserWindowController (TestingAPI)
615 611
616 612
617 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 613 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_command_handler.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698