| 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_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // valid parameter for pop-ups not associated with a browser. | 28 // valid parameter for pop-ups not associated with a browser. |
| 29 // The positioning of the pop-up is determined by |arrow_location| according | 29 // The positioning of the pop-up is determined by |arrow_location| according |
| 30 // to the following logic: The popup is anchored so that the corner indicated | 30 // to the following logic: The popup is anchored so that the corner indicated |
| 31 // by value of |arrow_location| remains fixed during popup resizes. | 31 // by value of |arrow_location| remains fixed during popup resizes. |
| 32 // If |arrow_location| is BOTTOM_*, then the popup 'pops up', otherwise | 32 // If |arrow_location| is BOTTOM_*, then the popup 'pops up', otherwise |
| 33 // the popup 'drops down'. | 33 // the popup 'drops down'. |
| 34 // Pass |inspect_with_devtools| as true to pin the popup open and show the | 34 // Pass |inspect_with_devtools| as true to pin the popup open and show the |
| 35 // devtools window for it. | 35 // devtools window for it. |
| 36 // The actual display of the popup is delayed until the page contents | 36 // The actual display of the popup is delayed until the page contents |
| 37 // finish loading in order to minimize UI flashing and resizing. | 37 // finish loading in order to minimize UI flashing and resizing. |
| 38 // TODO(benwells): remove unused |inspect_with_devtools| parameter. |
| 38 static ExtensionPopup* ShowPopup( | 39 static ExtensionPopup* ShowPopup( |
| 39 const GURL& url, | 40 const GURL& url, |
| 40 Browser* browser, | 41 Browser* browser, |
| 41 views::View* anchor_view, | 42 views::View* anchor_view, |
| 42 views::BubbleBorder::ArrowLocation arrow_location, | 43 views::BubbleBorder::ArrowLocation arrow_location, |
| 43 bool inspect_with_devtools); | 44 bool inspect_with_devtools); |
| 44 | 45 |
| 45 ExtensionHost* host() const { return extension_host_.get(); } | 46 ExtensionHost* host() const { return extension_host_.get(); } |
| 46 | 47 |
| 47 // content::NotificationObserver overrides. | 48 // content::NotificationObserver overrides. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool inspect_with_devtools_; | 86 bool inspect_with_devtools_; |
| 86 | 87 |
| 87 content::NotificationRegistrar registrar_; | 88 content::NotificationRegistrar registrar_; |
| 88 | 89 |
| 89 base::WeakPtrFactory<ExtensionPopup> close_bubble_factory_; | 90 base::WeakPtrFactory<ExtensionPopup> close_bubble_factory_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(ExtensionPopup); | 92 DISALLOW_COPY_AND_ASSIGN(ExtensionPopup); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ | 95 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_POPUP_H_ |
| OLD | NEW |