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

Unified Diff: chrome/renderer/render_view.cc

Issue 276032: Refactor notification provider in renderer process to not use a message filte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 28967)
+++ chrome/renderer/render_view.cc (working copy)
@@ -230,6 +230,8 @@
delay_seconds_for_form_state_sync_(kDefaultDelaySecondsForFormStateSync),
preferred_width_(0),
send_preferred_width_changes_(false),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ notification_provider_(new NotificationProvider(this))),
determine_page_text_after_loading_stops_(false),
view_type_(ViewType::INVALID),
browser_window_id_(-1),
@@ -262,7 +264,6 @@
#endif
render_thread_->RemoveFilter(audio_message_filter_);
- render_thread_->RemoveFilter(notification_provider_.get());
#ifndef NDEBUG
// Make sure we are no longer referenced by the ViewMap.
@@ -346,8 +347,6 @@
devtools_agent_.reset(new DevToolsAgent(routing_id, this));
- notification_provider_ = new NotificationProvider(this);
-
webwidget_ = WebView::Create(this);
Singleton<ViewMap>::get()->insert(std::make_pair(webview(), this));
webkit_preferences_.Apply(webview());
@@ -376,7 +375,6 @@
audio_message_filter_ = new AudioMessageFilter(routing_id_);
render_thread_->AddFilter(audio_message_filter_);
- render_thread_->AddFilter(notification_provider_.get());
}
void RenderView::OnMessageReceived(const IPC::Message& message) {
@@ -389,6 +387,8 @@
return;
if (devtools_agent_.get() && devtools_agent_->OnMessageReceived(message))
return;
+ if (notification_provider_->OnMessageReceived(message))
+ return;
IPC_BEGIN_MESSAGE_MAP(RenderView, message)
IPC_MESSAGE_HANDLER(ViewMsg_CaptureThumbnail, SendThumbnail)
« no previous file with comments | « chrome/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698