OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 class Browser; | 10 class Browser; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 // TODO(stevenjb): Replace this with GetExtensionWindowController(). | 55 // TODO(stevenjb): Replace this with GetExtensionWindowController(). |
56 Browser* GetCurrentBrowser() const; | 56 Browser* GetCurrentBrowser() const; |
57 | 57 |
58 // Same as above but uses WindowControllerList instead of BrowserList. | 58 // Same as above but uses WindowControllerList instead of BrowserList. |
59 extensions::WindowController* GetExtensionWindowController() const; | 59 extensions::WindowController* GetExtensionWindowController() const; |
60 | 60 |
61 // Gets the "current" web contents if any. If there is no associated web | 61 // Gets the "current" web contents if any. If there is no associated web |
62 // contents then defaults to the foremost one. | 62 // contents then defaults to the foremost one. |
63 content::WebContents* GetAssociatedWebContents(); | 63 content::WebContents* GetAssociatedWebContents(); |
64 | 64 |
65 // Gets the web contents if it's not from a background page. Otherwise this | |
not at google - send to devlin
2015/07/10 17:02:25
Actually can we call this method something with a
wjywbs
2015/07/10 19:54:22
I renamed this to be "GetOriginWebContents" becaus
| |
66 // method will try to find the app's web contents by the extension id, or | |
67 // find the web contents from source_tab_id if it's not | |
68 // TabStripModel::kNoTab. If the web contents still can't be found, NULL will | |
69 // be returned. | |
70 content::WebContents* GetVisibleWebContents(); | |
71 | |
65 // Returns a pointer to the associated UIThreadExtensionFunction | 72 // Returns a pointer to the associated UIThreadExtensionFunction |
66 UIThreadExtensionFunction* function() { return function_; } | 73 UIThreadExtensionFunction* function() { return function_; } |
67 const UIThreadExtensionFunction* function() const { return function_; } | 74 const UIThreadExtensionFunction* function() const { return function_; } |
68 | 75 |
69 private: | 76 private: |
70 // The function for which these details have been created. Must outlive the | 77 // The function for which these details have been created. Must outlive the |
71 // ChromeExtensionFunctionDetails instance. | 78 // ChromeExtensionFunctionDetails instance. |
72 UIThreadExtensionFunction* function_; | 79 UIThreadExtensionFunction* function_; |
73 | 80 |
74 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionFunctionDetails); | 81 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionFunctionDetails); |
75 }; | 82 }; |
76 | 83 |
77 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ |
OLD | NEW |