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

Side by Side Diff: chrome/browser/chromeos/net/network_portal_notification_controller.cc

Issue 2775973002: Promotes more accessors from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/net/network_portal_notification_controller.h" 5 #include "chrome/browser/chromeos/net/network_portal_notification_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/common/system/system_notifier.h" 12 #include "ash/common/system/system_notifier.h"
13 #include "ash/common/system/tray/system_tray_notifier.h" 13 #include "ash/common/system/tray/system_tray_notifier.h"
14 #include "ash/common/wm_shell.h" 14 #include "ash/shell.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
20 #include "base/metrics/histogram_macros.h" 20 #include "base/metrics/histogram_macros.h"
21 #include "base/strings/string16.h" 21 #include "base/strings/string16.h"
22 #include "base/strings/string_number_conversions.h" 22 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // Don't do anything if we're currently activating the device. 293 // Don't do anything if we're currently activating the device.
294 if (MobileActivator::GetInstance()->RunningActivation()) 294 if (MobileActivator::GetInstance()->RunningActivation())
295 return; 295 return;
296 296
297 // Don't do anything if notification for |network| already was 297 // Don't do anything if notification for |network| already was
298 // displayed. 298 // displayed.
299 if (network->guid() == last_network_guid_) 299 if (network->guid() == last_network_guid_)
300 return; 300 return;
301 last_network_guid_ = network->guid(); 301 last_network_guid_ = network->guid();
302 302
303 if (ash::WmShell::HasInstance()) { 303 if (ash::Shell::HasInstance()) {
304 ash::WmShell::Get()->system_tray_notifier()->NotifyOnCaptivePortalDetected( 304 ash::Shell::Get()->system_tray_notifier()->NotifyOnCaptivePortalDetected(
305 network->guid()); 305 network->guid());
306 } 306 }
307 307
308 message_center::MessageCenter::Get()->AddNotification( 308 message_center::MessageCenter::Get()->AddNotification(
309 GetNotification(network, state)); 309 GetNotification(network, state));
310 } 310 }
311 311
312 void NetworkPortalNotificationController::ShowDialog() { 312 void NetworkPortalNotificationController::ShowDialog() {
313 if (dialog_) 313 if (dialog_)
314 return; 314 return;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (dialog_) 440 if (dialog_)
441 dialog_->Close(); 441 dialog_->Close();
442 } 442 }
443 443
444 const NetworkPortalWebDialog* 444 const NetworkPortalWebDialog*
445 NetworkPortalNotificationController::GetDialogForTesting() const { 445 NetworkPortalNotificationController::GetDialogForTesting() const {
446 return dialog_; 446 return dialog_;
447 } 447 }
448 448
449 } // namespace chromeos 449 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/DEPS ('k') | chrome/browser/chromeos/ui/screen_capture_notification_ui_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698