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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.h

Issue 670463004: Make a platform-independent ToolbarActionViewController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <string>
9 10
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
12 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 13 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 16
16 class Browser; 17 class Browser;
17 class DevtoolsNotificationBridge; 18 class DevtoolsNotificationBridge;
18 class ExtensionPopupContainer; 19 class ExtensionPopupContainer;
(...skipping 22 matching lines...) Expand all
41 // frame if the size hasn't changed. 42 // frame if the size hasn't changed.
42 NSRect extensionFrame_; 43 NSRect extensionFrame_;
43 44
44 // The extension host object. 45 // The extension host object.
45 scoped_ptr<extensions::ExtensionViewHost> host_; 46 scoped_ptr<extensions::ExtensionViewHost> host_;
46 47
47 scoped_ptr<content::NotificationRegistrar> registrar_; 48 scoped_ptr<content::NotificationRegistrar> registrar_;
48 scoped_ptr<DevtoolsNotificationBridge> notificationBridge_; 49 scoped_ptr<DevtoolsNotificationBridge> notificationBridge_;
49 scoped_ptr<ExtensionPopupContainer> container_; 50 scoped_ptr<ExtensionPopupContainer> container_;
50 51
52 std::string extensionId_;
53
51 // Whether the popup has a devtools window attached to it. 54 // Whether the popup has a devtools window attached to it.
52 BOOL beingInspected_; 55 BOOL beingInspected_;
53 56
54 // There's an extra windowDidResignKey: notification right after a 57 // There's an extra windowDidResignKey: notification right after a
55 // ConstrainedWindow closes that should be ignored. 58 // ConstrainedWindow closes that should be ignored.
56 BOOL ignoreWindowDidResignKey_; 59 BOOL ignoreWindowDidResignKey_;
57 60
58 // The size once the ExtensionView has loaded. 61 // The size once the ExtensionView has loaded.
59 NSSize pendingSize_; 62 NSSize pendingSize_;
60 } 63 }
(...skipping 26 matching lines...) Expand all
87 90
88 // Whether the popup is in the process of closing (via Core Animation). 91 // Whether the popup is in the process of closing (via Core Animation).
89 - (BOOL)isClosing; 92 - (BOOL)isClosing;
90 93
91 // Show the dev tools attached to the popup. 94 // Show the dev tools attached to the popup.
92 - (void)showDevTools; 95 - (void)showDevTools;
93 96
94 // Set whether the popup is being inspected or not. If it is being inspected 97 // Set whether the popup is being inspected or not. If it is being inspected
95 // it will not be hidden when it loses focus. 98 // it will not be hidden when it loses focus.
96 - (void)setBeingInspected:(BOOL)beingInspected; 99 - (void)setBeingInspected:(BOOL)beingInspected;
100
101 @property(readonly, nonatomic) std::string extensionId;
102
97 @end 103 @end
98 104
99 @interface ExtensionPopupController(TestingAPI) 105 @interface ExtensionPopupController(TestingAPI)
100 // Returns a weak pointer to the current popup's view. 106 // Returns a weak pointer to the current popup's view.
101 - (NSView*)view; 107 - (NSView*)view;
102 // Returns the minimum allowed size for an extension popup. 108 // Returns the minimum allowed size for an extension popup.
103 + (NSSize)minPopupSize; 109 + (NSSize)minPopupSize;
104 // Returns the maximum allowed size for an extension popup. 110 // Returns the maximum allowed size for an extension popup.
105 + (NSSize)maxPopupSize; 111 + (NSSize)maxPopupSize;
106 @end 112 @end
107 113
108 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_ 114 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698