Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1026)

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 155071: Do some refactoring of renderer_host.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_host.cc
===================================================================
--- chrome/browser/extensions/extension_host.cc (revision 19907)
+++ chrome/browser/extensions/extension_host.cc (working copy)
@@ -159,25 +159,6 @@
Details<ExtensionHost>(this));
}
-WebPreferences ExtensionHost::GetWebkitPrefs() {
- PrefService* prefs = render_view_host()->process()->profile()->GetPrefs();
- const bool kIsDomUI = true;
- return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI);
-}
-
-void ExtensionHost::RunJavaScriptMessage(
- const std::wstring& message,
- const std::wstring& default_prompt,
- const GURL& frame_url,
- const int flags,
- IPC::Message* reply_msg,
- bool* did_suppress_message) {
- // Automatically cancel the javascript alert (otherwise the renderer hangs
- // indefinitely).
- *did_suppress_message = true;
- render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true, L"");
-}
-
void ExtensionHost::DidStopLoading(RenderViewHost* render_view_host) {
// TODO(aa): This is toolstrip-specific and should probably not be here.
// ExtensionToolstrip in bookmark_bar_view.cc?
@@ -189,6 +170,40 @@
did_stop_loading_ = true;
}
+void ExtensionHost::RunJavaScriptMessage(const std::wstring& message,
+ const std::wstring& default_prompt,
+ const GURL& frame_url,
+ const int flags,
+ IPC::Message* reply_msg,
+ bool* did_suppress_message) {
+ // Automatically cancel the javascript alert (otherwise the renderer hangs
+ // indefinitely).
+ *did_suppress_message = true;
+ render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true, L"");
+}
+
+GURL ExtensionHost::GetAlternateErrorPageURL() const {
+ return GURL();
+}
+
+RendererPreferences ExtensionHost::GetRendererPrefs() const {
+ return RendererPreferences();
+}
+
+WebPreferences ExtensionHost::GetWebkitPrefs() {
+ PrefService* prefs = render_view_host()->process()->profile()->GetPrefs();
+ const bool kIsDomUI = true;
+ return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI);
+}
+
+void ExtensionHost::ProcessDOMUIMessage(const std::string& message,
+ const std::string& content,
+ int request_id,
+ bool has_callback) {
+ extension_function_dispatcher_->HandleRequest(message, content, request_id,
+ has_callback);
+}
+
void ExtensionHost::DidInsertCSS() {
#if defined(TOOLKIT_VIEWS)
if (view_.get())
@@ -298,14 +313,6 @@
return browser;
}
-void ExtensionHost::ProcessDOMUIMessage(const std::string& message,
- const std::string& content,
- int request_id,
- bool has_callback) {
- extension_function_dispatcher_->HandleRequest(message, content, request_id,
- has_callback);
-}
-
void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
extension_function_dispatcher_.reset(
new ExtensionFunctionDispatcher(render_view_host_, this, url_));

Powered by Google App Engine
This is Rietveld 408576698