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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 #include "chrome/browser/profiles/profile.h" 36 #include "chrome/browser/profiles/profile.h"
37 #include "chrome/browser/ui/browser.h" 37 #include "chrome/browser/ui/browser.h"
38 #include "chrome/browser/ui/browser_list.h" 38 #include "chrome/browser/ui/browser_list.h"
39 #include "chrome/browser/ui/browser_window.h" 39 #include "chrome/browser/ui/browser_window.h"
40 #include "chrome/browser/ui/views/window.h" 40 #include "chrome/browser/ui/views/window.h"
41 #include "chrome/browser/ui/webui/web_ui_util.h" 41 #include "chrome/browser/ui/webui/web_ui_util.h"
42 #include "chrome/common/chrome_notification_types.h" 42 #include "chrome/common/chrome_notification_types.h"
43 #include "chrome/common/chrome_switches.h" 43 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
45 #include "chrome/common/time_format.h" 45 #include "chrome/common/time_format.h"
46 #include "content/common/notification_service.h" 46 #include "content/public/browser/notification_service.h"
47 #include "grit/chromium_strings.h" 47 #include "grit/chromium_strings.h"
48 #include "grit/generated_resources.h" 48 #include "grit/generated_resources.h"
49 #include "grit/locale_settings.h" 49 #include "grit/locale_settings.h"
50 #include "grit/theme_resources.h" 50 #include "grit/theme_resources.h"
51 #include "third_party/skia/include/core/SkBitmap.h" 51 #include "third_party/skia/include/core/SkBitmap.h"
52 #include "ui/base/l10n/l10n_util.h" 52 #include "ui/base/l10n/l10n_util.h"
53 #include "ui/base/resource/resource_bundle.h" 53 #include "ui/base/resource/resource_bundle.h"
54 #include "views/widget/widget.h" 54 #include "views/widget/widget.h"
55 55
56 static const char kOtherNetworksFakePath[] = "?"; 56 static const char kOtherNetworksFakePath[] = "?";
57 57
58 InternetOptionsHandler::InternetOptionsHandler() 58 InternetOptionsHandler::InternetOptionsHandler()
59 : chromeos::CrosOptionsPageUIHandler(NULL), 59 : chromeos::CrosOptionsPageUIHandler(NULL),
60 proxy_settings_(NULL) { 60 proxy_settings_(NULL) {
61 registrar_.Add(this, chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED, 61 registrar_.Add(this, chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED,
62 NotificationService::AllSources()); 62 content::NotificationService::AllSources());
63 registrar_.Add(this, chrome::NOTIFICATION_ENTER_PIN_ENDED, 63 registrar_.Add(this, chrome::NOTIFICATION_ENTER_PIN_ENDED,
64 NotificationService::AllSources()); 64 content::NotificationService::AllSources());
65 cros_ = chromeos::CrosLibrary::Get()->GetNetworkLibrary(); 65 cros_ = chromeos::CrosLibrary::Get()->GetNetworkLibrary();
66 if (cros_) { 66 if (cros_) {
67 cros_->AddNetworkManagerObserver(this); 67 cros_->AddNetworkManagerObserver(this);
68 cros_->AddCellularDataPlanObserver(this); 68 cros_->AddCellularDataPlanObserver(this);
69 MonitorNetworks(); 69 MonitorNetworks();
70 } 70 }
71 } 71 }
72 72
73 InternetOptionsHandler::~InternetOptionsHandler() { 73 InternetOptionsHandler::~InternetOptionsHandler() {
74 if (cros_) { 74 if (cros_) {
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 dictionary->Set("wirelessList", GetWirelessList()); 1324 dictionary->Set("wirelessList", GetWirelessList());
1325 dictionary->Set("vpnList", GetVPNList()); 1325 dictionary->Set("vpnList", GetVPNList());
1326 dictionary->Set("rememberedList", GetRememberedList()); 1326 dictionary->Set("rememberedList", GetRememberedList());
1327 dictionary->SetBoolean("wifiAvailable", cros_->wifi_available()); 1327 dictionary->SetBoolean("wifiAvailable", cros_->wifi_available());
1328 dictionary->SetBoolean("wifiBusy", cros_->wifi_busy()); 1328 dictionary->SetBoolean("wifiBusy", cros_->wifi_busy());
1329 dictionary->SetBoolean("wifiEnabled", cros_->wifi_enabled()); 1329 dictionary->SetBoolean("wifiEnabled", cros_->wifi_enabled());
1330 dictionary->SetBoolean("cellularAvailable", cros_->cellular_available()); 1330 dictionary->SetBoolean("cellularAvailable", cros_->cellular_available());
1331 dictionary->SetBoolean("cellularBusy", cros_->cellular_busy()); 1331 dictionary->SetBoolean("cellularBusy", cros_->cellular_busy());
1332 dictionary->SetBoolean("cellularEnabled", cros_->cellular_enabled()); 1332 dictionary->SetBoolean("cellularEnabled", cros_->cellular_enabled());
1333 } 1333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698