| 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_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 #include <string> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // ExtensionPopupController with the parent window retrieved from |browser|, a | 69 // ExtensionPopupController with the parent window retrieved from |browser|, a |
| 70 // host for the popup created by the extension process manager specific to the | 70 // host for the popup created by the extension process manager specific to the |
| 71 // browser profile and the remaining arguments |anchoredAt| and |arrowLocation|. | 71 // browser profile and the remaining arguments |anchoredAt| and |arrowLocation|. |
| 72 // |anchoredAt| is expected to be in the window's coordinates at the bottom | 72 // |anchoredAt| is expected to be in the window's coordinates at the bottom |
| 73 // center of the browser action button. | 73 // center of the browser action button. |
| 74 // The actual display of the popup is delayed until the page contents finish | 74 // The actual display of the popup is delayed until the page contents finish |
| 75 // loading in order to minimize UI flashing and resizing. | 75 // loading in order to minimize UI flashing and resizing. |
| 76 // Passing YES to |devMode| will launch the webkit inspector for the popup, | 76 // Passing YES to |devMode| will launch the webkit inspector for the popup, |
| 77 // and prevent the popup from closing when focus is lost. It will be closed | 77 // and prevent the popup from closing when focus is lost. It will be closed |
| 78 // after the inspector is closed, or another popup is opened. | 78 // after the inspector is closed, or another popup is opened. |
| 79 + (ExtensionPopupController*)showURL:(GURL)url | 79 + (ExtensionPopupController*)host:(scoped_ptr<extensions::ExtensionViewHost>) |
| 80 inBrowser:(Browser*)browser | 80 host |
| 81 anchoredAt:(NSPoint)anchoredAt | 81 inBrowser:(Browser*)browser |
| 82 arrowLocation:(info_bubble::BubbleArrowLocation) | 82 anchoredAt:(NSPoint)anchoredAt |
| 83 arrowLocation | 83 arrowLocation:(info_bubble::BubbleArrowLocation) |
| 84 devMode:(BOOL)devMode; | 84 arrowLocation |
| 85 devMode:(BOOL)devMode; |
| 85 | 86 |
| 86 // Returns the controller used to display the popup being shown. If no popup is | 87 // Returns the controller used to display the popup being shown. If no popup is |
| 87 // currently open, then nil is returned. Static because only one extension popup | 88 // currently open, then nil is returned. Static because only one extension popup |
| 88 // window can be open at a time. | 89 // window can be open at a time. |
| 89 + (ExtensionPopupController*)popup; | 90 + (ExtensionPopupController*)popup; |
| 90 | 91 |
| 91 // Whether the popup is in the process of closing (via Core Animation). | 92 // Whether the popup is in the process of closing (via Core Animation). |
| 92 - (BOOL)isClosing; | 93 - (BOOL)isClosing; |
| 93 | 94 |
| 94 // Show the dev tools attached to the popup. | 95 // Show the dev tools attached to the popup. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 105 @interface ExtensionPopupController(TestingAPI) | 106 @interface ExtensionPopupController(TestingAPI) |
| 106 // Returns a weak pointer to the current popup's view. | 107 // Returns a weak pointer to the current popup's view. |
| 107 - (NSView*)view; | 108 - (NSView*)view; |
| 108 // Returns the minimum allowed size for an extension popup. | 109 // Returns the minimum allowed size for an extension popup. |
| 109 + (NSSize)minPopupSize; | 110 + (NSSize)minPopupSize; |
| 110 // Returns the maximum allowed size for an extension popup. | 111 // Returns the maximum allowed size for an extension popup. |
| 111 + (NSSize)maxPopupSize; | 112 + (NSSize)maxPopupSize; |
| 112 @end | 113 @end |
| 113 | 114 |
| 114 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_ | 115 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_POPUP_CONTROLLER_H_ |
| OLD | NEW |