OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSION_DOM_UI_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // DOMUI | 34 // DOMUI |
35 virtual void RenderViewCreated(RenderViewHost* render_view_host); | 35 virtual void RenderViewCreated(RenderViewHost* render_view_host); |
36 virtual void RenderViewReused(RenderViewHost* render_view_host); | 36 virtual void RenderViewReused(RenderViewHost* render_view_host); |
37 virtual void ProcessDOMUIMessage(const std::string& message, | 37 virtual void ProcessDOMUIMessage(const std::string& message, |
38 const Value* content, | 38 const Value* content, |
39 int request_id, | 39 int request_id, |
40 bool has_callback); | 40 bool has_callback); |
41 | 41 |
42 // ExtensionFunctionDispatcher::Delegate | 42 // ExtensionFunctionDispatcher::Delegate |
43 virtual Browser* GetBrowser(); | 43 virtual Browser* GetBrowser() const; |
44 virtual ExtensionDOMUI* GetExtensionDOMUI() { return this; } | 44 virtual ExtensionDOMUI* GetExtensionDOMUI() { return this; } |
| 45 virtual gfx::NativeWindow GetFrameNativeWindow(); |
45 | 46 |
46 // ExtensionPopupHost::Delegate | 47 // ExtensionPopupHost::Delegate |
47 virtual RenderViewHost* GetRenderViewHost(); | 48 virtual RenderViewHost* GetRenderViewHost(); |
| 49 virtual Profile* GetProfile(); |
48 | 50 |
49 // BrowserURLHandler | 51 // BrowserURLHandler |
50 static bool HandleChromeURLOverride(GURL* url, Profile* profile); | 52 static bool HandleChromeURLOverride(GURL* url, Profile* profile); |
51 | 53 |
52 // Register and unregister a dictionary of one or more overrides. | 54 // Register and unregister a dictionary of one or more overrides. |
53 // Page names are the keys, and chrome-extension: URLs are the values. | 55 // Page names are the keys, and chrome-extension: URLs are the values. |
54 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } | 56 // (e.g. { "newtab": "chrome-extension://<id>/my_new_tab.html" } |
55 static void RegisterChromeURLOverrides(Profile* profile, | 57 static void RegisterChromeURLOverrides(Profile* profile, |
56 const Extension::URLOverrideMap& overrides); | 58 const Extension::URLOverrideMap& overrides); |
57 static void UnregisterChromeURLOverrides(Profile* profile, | 59 static void UnregisterChromeURLOverrides(Profile* profile, |
(...skipping 15 matching lines...) Expand all Loading... |
73 | 75 |
74 // When the RenderViewHost changes (RenderViewCreated and RenderViewReused), | 76 // When the RenderViewHost changes (RenderViewCreated and RenderViewReused), |
75 // we need to reset the ExtensionFunctionDispatcher so it's talking to the | 77 // we need to reset the ExtensionFunctionDispatcher so it's talking to the |
76 // right one, as well as being linked to the correct URL. | 78 // right one, as well as being linked to the correct URL. |
77 void ResetExtensionFunctionDispatcher(RenderViewHost* render_view_host); | 79 void ResetExtensionFunctionDispatcher(RenderViewHost* render_view_host); |
78 | 80 |
79 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; | 81 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; |
80 }; | 82 }; |
81 | 83 |
82 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DOM_UI_H_ |
OLD | NEW |