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

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

Issue 9265018: Change grow box computation back to a method on BrowserWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 years, 11 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 #pragma once 7 #pragma once
8 8
9 // A class acting as the Objective-C controller for the Browser 9 // A class acting as the Objective-C controller for the Browser
10 // object. Handles interactions between Cocoa and the cross-platform 10 // object. Handles interactions between Cocoa and the cross-platform
11 // code. Each window has a single toolbar and, by virtue of being a 11 // code. Each window has a single toolbar and, by virtue of being a
12 // TabWindowController, a tab strip along the top. 12 // TabWindowController, a tab strip along the top.
13 13
14 #import <Cocoa/Cocoa.h> 14 #import <Cocoa/Cocoa.h>
15 15
16 #include "base/memory/scoped_nsobject.h" 16 #include "base/memory/scoped_nsobject.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "chrome/browser/sync/sync_ui_util.h" 18 #include "chrome/browser/sync/sync_ui_util.h"
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
21 #import "chrome/browser/ui/cocoa/browser_command_executor.h" 21 #import "chrome/browser/ui/cocoa/browser_command_executor.h"
22 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" 22 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h"
23 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
24 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 23 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
25 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 24 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
26 #import "chrome/browser/ui/cocoa/themed_window.h" 25 #import "chrome/browser/ui/cocoa/themed_window.h"
27 #import "chrome/browser/ui/cocoa/url_drop_target.h" 26 #import "chrome/browser/ui/cocoa/url_drop_target.h"
28 #import "chrome/browser/ui/cocoa/view_resizer.h" 27 #import "chrome/browser/ui/cocoa/view_resizer.h"
29 #include "ui/gfx/rect.h" 28 #include "ui/gfx/rect.h"
30 29
31 @class AvatarButtonController; 30 @class AvatarButtonController;
32 class Browser; 31 class Browser;
33 class BrowserWindow; 32 class BrowserWindow;
34 class BrowserWindowCocoa; 33 class BrowserWindowCocoa;
35 class ConstrainedWindowMac; 34 class ConstrainedWindowMac;
36 @class DevToolsController; 35 @class DevToolsController;
37 @class DownloadShelfController; 36 @class DownloadShelfController;
38 @class FindBarCocoaController; 37 @class FindBarCocoaController;
39 @class FullscreenWindow; 38 @class FullscreenWindow;
40 @class GTMWindowSheetController; 39 @class GTMWindowSheetController;
41 @class InfoBarContainerController; 40 @class InfoBarContainerController;
42 class LocationBarViewMac; 41 class LocationBarViewMac;
43 @class PresentationModeController; 42 @class PresentationModeController;
44 @class PreviewableContentsController; 43 @class PreviewableContentsController;
45 class StatusBubbleMac; 44 class StatusBubbleMac;
46 class TabContents;
47 @class TabStripController; 45 @class TabStripController;
48 @class TabStripView; 46 @class TabStripView;
49 @class ToolbarController; 47 @class ToolbarController;
50 48
51 namespace content { 49 namespace content {
52 class WebContents; 50 class WebContents;
53 } 51 }
54 52
55 @interface BrowserWindowController : 53 @interface BrowserWindowController :
56 TabWindowController<NSUserInterfaceValidations, 54 TabWindowController<NSUserInterfaceValidations,
57 BookmarkBarControllerDelegate, 55 BookmarkBarControllerDelegate,
58 BrowserCommandExecutor, 56 BrowserCommandExecutor,
59 ViewResizer, 57 ViewResizer,
60 TabContentsControllerDelegate,
61 TabStripControllerDelegate> { 58 TabStripControllerDelegate> {
62 @private 59 @private
63 // The ordering of these members is important as it determines the order in 60 // The ordering of these members is important as it determines the order in
64 // which they are destroyed. |browser_| needs to be destroyed last as most of 61 // which they are destroyed. |browser_| needs to be destroyed last as most of
65 // the other objects hold weak references to it or things it owns 62 // the other objects hold weak references to it or things it owns
66 // (tab/toolbar/bookmark models, profiles, etc). 63 // (tab/toolbar/bookmark models, profiles, etc).
67 scoped_ptr<Browser> browser_; 64 scoped_ptr<Browser> browser_;
68 NSWindow* savedRegularWindow_; 65 NSWindow* savedRegularWindow_;
69 scoped_ptr<BrowserWindowCocoa> windowShim_; 66 scoped_ptr<BrowserWindowCocoa> windowShim_;
70 scoped_nsobject<ToolbarController> toolbarController_; 67 scoped_nsobject<ToolbarController> toolbarController_;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Updates the toolbar (and transitively the location bar) with the states of 208 // Updates the toolbar (and transitively the location bar) with the states of
212 // the specified |tab|. If |shouldRestore| is true, we're switching 209 // the specified |tab|. If |shouldRestore| is true, we're switching
213 // (back?) to this tab and should restore any previous location bar state 210 // (back?) to this tab and should restore any previous location bar state
214 // (such as user editing) as well. 211 // (such as user editing) as well.
215 - (void)updateToolbarWithContents:(content::WebContents*)tab 212 - (void)updateToolbarWithContents:(content::WebContents*)tab
216 shouldRestoreState:(BOOL)shouldRestore; 213 shouldRestoreState:(BOOL)shouldRestore;
217 214
218 // Sets whether or not the current page in the frontmost tab is bookmarked. 215 // Sets whether or not the current page in the frontmost tab is bookmarked.
219 - (void)setStarredState:(BOOL)isStarred; 216 - (void)setStarredState:(BOOL)isStarred;
220 217
218 // Return the rect, in WebKit coordinates (flipped), of the window's grow box
219 // in the coordinate system of the content area of the currently selected tab.
220 - (NSRect)selectedTabGrowBoxRect;
221
221 // Called to tell the selected tab to update its loading state. 222 // Called to tell the selected tab to update its loading state.
222 // |force| is set if the update is due to changing tabs, as opposed to 223 // |force| is set if the update is due to changing tabs, as opposed to
223 // the page-load finishing. See comment in reload_button.h. 224 // the page-load finishing. See comment in reload_button.h.
224 - (void)setIsLoading:(BOOL)isLoading force:(BOOL)force; 225 - (void)setIsLoading:(BOOL)isLoading force:(BOOL)force;
225 226
226 // Brings this controller's window to the front. 227 // Brings this controller's window to the front.
227 - (void)activate; 228 - (void)activate;
228 229
229 // Make the location bar the first responder, if possible. 230 // Make the location bar the first responder, if possible.
230 - (void)focusLocationBar:(BOOL)selectAll; 231 - (void)focusLocationBar:(BOOL)selectAll;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // |source| rect doesn't fit into |target|. 466 // |source| rect doesn't fit into |target|.
466 - (NSSize)overflowFrom:(NSRect)source 467 - (NSSize)overflowFrom:(NSRect)source
467 to:(NSRect)target; 468 to:(NSRect)target;
468 469
469 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. 470 // The fullscreen exit bubble controller, or nil if the bubble isn't showing.
470 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; 471 - (FullscreenExitBubbleController*)fullscreenExitBubbleController;
471 @end // @interface BrowserWindowController (TestingAPI) 472 @end // @interface BrowserWindowController (TestingAPI)
472 473
473 474
474 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 475 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.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