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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 7259004: Convert ViewMsg_NetworkStateChanged from routed -> control, allowing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create a very simple observer, use it in BrowserProcess Created 9 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: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index e00e238cdc1be818c1a2bfee1880ab47e7558343..4dae249b064c4fc86ab76e44e4342ebcc2ebe7de 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -202,11 +202,6 @@ TabContents::TabContents(Profile* profile,
registrar_.Add(this, NotificationType::RENDER_WIDGET_HOST_DESTROYED,
NotificationService::AllSources());
-
- // Can only add observers after render_manager_.Init() is called, since that's
- // what sets up the render_view_host which TabContentObserver's constructor
- // uses to get the routing_id.
- AddObservers();
}
TabContents::~TabContents() {
@@ -251,12 +246,6 @@ TabContents::~TabContents() {
}
FOR_EACH_OBSERVER(TabContentsObserver, observers_, TabContentsDestroyed());
-
- net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
-}
-
-void TabContents::AddObservers() {
- net::NetworkChangeNotifier::AddOnlineStateObserver(this);
}
bool TabContents::OnMessageReceived(const IPC::Message& message) {
@@ -1839,8 +1828,3 @@ void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
rwh_view->SetSize(view()->GetContainerSize());
}
-
-void TabContents::OnOnlineStateChanged(bool online) {
- render_view_host()->Send(new ViewMsg_NetworkStateChanged(
- render_view_host()->routing_id(), online));
-}

Powered by Google App Engine
This is Rietveld 408576698