| OLD | NEW |
| (Empty) | |
| 1 #include "chrome/browser/extensions/extension_dom_ui.h" |
| 2 |
| 3 #include "chrome/browser/browser.h" |
| 4 #include "chrome/browser/tab_contents/tab_contents.h" |
| 5 #include "chrome/common/bindings_policy.h" |
| 6 |
| 7 ExtensionDOMUI::ExtensionDOMUI(TabContents* tab_contents) |
| 8 : DOMUI(tab_contents) { |
| 9 // TODO(aa): It would be cool to show the extension's icon in here. |
| 10 hide_favicon_ = true; |
| 11 should_hide_url_ = true; |
| 12 bindings_ = BindingsPolicy::EXTENSION; |
| 13 } |
| 14 |
| 15 void ExtensionDOMUI::RenderViewCreated(RenderViewHost* render_view_host) { |
| 16 extension_function_dispatcher_.reset( |
| 17 new ExtensionFunctionDispatcher(render_view_host, this, |
| 18 tab_contents()->GetURL())); |
| 19 } |
| 20 |
| 21 void ExtensionDOMUI::ProcessDOMUIMessage(const std::string& message, |
| 22 const std::string& content, |
| 23 int request_id, |
| 24 bool has_callback) { |
| 25 extension_function_dispatcher_->HandleRequest(message, content, request_id, |
| 26 has_callback); |
| 27 } |
| 28 |
| 29 Browser* ExtensionDOMUI::GetBrowser() { |
| 30 return static_cast<Browser*>(tab_contents()->delegate()); |
| 31 } |
| OLD | NEW |