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

Side by Side Diff: content/browser/net/browser_online_state_observer.cc

Issue 7300018: Revert 91390 (build breakage) - Convert ViewMsg_NetworkStateChanged from routed -> control (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/net/browser_online_state_observer.h"
6
7 #include "content/browser/renderer_host/render_process_host.h"
8 #include "content/common/view_messages.h"
9 #include "net/base/network_change_notifier.h"
10
11 BrowserOnlineStateObserver::BrowserOnlineStateObserver() {
12 net::NetworkChangeNotifier::AddOnlineStateObserver(this);
13 }
14
15 BrowserOnlineStateObserver::~BrowserOnlineStateObserver() {
16 net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
17 }
18
19 void BrowserOnlineStateObserver::OnOnlineStateChanged(bool online) {
20 for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
21 !it.IsAtEnd(); it.Advance()) {
22 it.GetCurrentValue()->Send(new ViewMsg_NetworkStateChanged(online));
23 }
24 }
OLDNEW
« no previous file with comments | « content/browser/net/browser_online_state_observer.h ('k') | content/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698