| 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 // Returns a pointer to the associated UIThreadExtensionFunction |
| 66 UIThreadExtensionFunction* function() { return function_; } |
| 67 const UIThreadExtensionFunction* function() const { return function_; } |
| 68 |
| 65 private: | 69 private: |
| 66 // The function for which these details have been created. Must outlive the | 70 // The function for which these details have been created. Must outlive the |
| 67 // ChromeExtensionFunctionDetails instance. | 71 // ChromeExtensionFunctionDetails instance. |
| 68 UIThreadExtensionFunction* function_; | 72 UIThreadExtensionFunction* function_; |
| 69 | 73 |
| 70 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionFunctionDetails); | 74 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionFunctionDetails); |
| 71 }; | 75 }; |
| 72 | 76 |
| 73 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ | 77 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ |
| OLD | NEW |