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

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

Issue 2742813003: [Mac] Lay out the browser window when adding the download shelf. (Closed)
Patch Set: Test name and whitespace tweaks. Created 3 years, 9 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
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 #include "chrome/browser/ui/browser.h"
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
21 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 22 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 23 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 24 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
24 #import "chrome/browser/ui/cocoa/themed_window.h" 25 #import "chrome/browser/ui/cocoa/themed_window.h"
25 #import "chrome/browser/ui/cocoa/url_drop_target.h" 26 #import "chrome/browser/ui/cocoa/url_drop_target.h"
26 #import "chrome/browser/ui/cocoa/view_resizer.h" 27 #import "chrome/browser/ui/cocoa/view_resizer.h"
27 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" 28 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
28 #include "chrome/browser/ui/tabs/tab_utils.h" 29 #include "chrome/browser/ui/tabs/tab_utils.h"
29 #include "components/translate/core/common/translate_errors.h" 30 #include "components/translate/core/common/translate_errors.h"
30 #include "ui/base/accelerators/accelerator_manager.h" 31 #include "ui/base/accelerators/accelerator_manager.h"
31 #include "ui/gfx/geometry/rect.h" 32 #include "ui/gfx/geometry/rect.h"
32 33
33 @class AvatarBaseController; 34 @class AvatarBaseController;
34 class BookmarkBubbleObserverCocoa; 35 class BookmarkBubbleObserverCocoa;
35 class Browser;
36 class BrowserWindow; 36 class BrowserWindow;
37 class BrowserWindowCocoa; 37 class BrowserWindowCocoa;
38 @class BrowserWindowFullscreenTransition; 38 @class BrowserWindowFullscreenTransition;
39 @class BrowserWindowTouchBar; 39 @class BrowserWindowTouchBar;
40 @class DevToolsController; 40 @class DevToolsController;
41 @class DownloadShelfController; 41 @class DownloadShelfController;
42 class ExtensionKeybindingRegistryCocoa; 42 class ExtensionKeybindingRegistryCocoa;
43 class ExclusiveAccessController; 43 class ExclusiveAccessController;
44 class ExclusiveAccessContext; 44 class ExclusiveAccessContext;
45 @class FindBarCocoaController; 45 @class FindBarCocoaController;
(...skipping 12 matching lines...) Expand all
58 @class TranslateBubbleController; 58 @class TranslateBubbleController;
59 59
60 namespace content { 60 namespace content {
61 class WebContents; 61 class WebContents;
62 } 62 }
63 63
64 namespace extensions { 64 namespace extensions {
65 class Command; 65 class Command;
66 } 66 }
67 67
68 inline NSSize MinWindowSizeForBrowserType(Browser::Type type) {
tapted 2017/03/13 00:25:36 See later comment for details, but I think we need
Sidney San Martín 2017/03/14 23:28:39 Done. I don't think they need storage space (http:
69 switch (type) {
70 case Browser::TYPE_TABBED:
71 return NSMakeSize(400, 272);
72 case Browser::TYPE_POPUP:
73 return NSMakeSize(100, 122);
74 }
75 }
76
68 @interface BrowserWindowController 77 @interface BrowserWindowController
69 : TabWindowController<BookmarkBarControllerDelegate, 78 : TabWindowController<BookmarkBarControllerDelegate,
70 ViewResizer, 79 ViewResizer,
71 TabStripControllerDelegate> { 80 TabStripControllerDelegate> {
72 @private 81 @private
73 // The ordering of these members is important as it determines the order in 82 // The ordering of these members is important as it determines the order in
74 // which they are destroyed. |browser_| needs to be destroyed last as most of 83 // which they are destroyed. |browser_| needs to be destroyed last as most of
75 // the other objects hold weak references to it or things it owns 84 // the other objects hold weak references to it or things it owns
76 // (tab/toolbar/bookmark models, profiles, etc). 85 // (tab/toolbar/bookmark models, profiles, etc).
77 std::unique_ptr<Browser> browser_; 86 std::unique_ptr<Browser> browser_;
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 // Returns the fullscreen toolbar controller. 620 // Returns the fullscreen toolbar controller.
612 - (FullscreenToolbarController*)fullscreenToolbarController; 621 - (FullscreenToolbarController*)fullscreenToolbarController;
613 622
614 // Sets the fullscreen toolbar controller. 623 // Sets the fullscreen toolbar controller.
615 - (void)setFullscreenToolbarController:(FullscreenToolbarController*)controller; 624 - (void)setFullscreenToolbarController:(FullscreenToolbarController*)controller;
616 625
617 @end // @interface BrowserWindowController (TestingAPI) 626 @end // @interface BrowserWindowController (TestingAPI)
618 627
619 628
620 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 629 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698