| OLD | NEW | 
|    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 "ash/shell.h" |    7 #include "ash/shell.h" | 
|    8 #include "ash/system/system_notifier.h" |    8 #include "ash/system/system_notifier.h" | 
|    9 #include "ash/system/tray/system_tray_notifier.h" |    9 #include "ash/system/tray/system_tray_notifier.h" | 
|   10 #include "base/basictypes.h" |   10 #include "base/basictypes.h" | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   47   message_center::MessageCenter::Get()->RemoveNotification( |   47   message_center::MessageCenter::Get()->RemoveNotification( | 
|   48       NetworkPortalNotificationController::kNotificationId, false); |   48       NetworkPortalNotificationController::kNotificationId, false); | 
|   49 } |   49 } | 
|   50  |   50  | 
|   51 class NetworkPortalNotificationControllerDelegate |   51 class NetworkPortalNotificationControllerDelegate | 
|   52     : public message_center::NotificationDelegate { |   52     : public message_center::NotificationDelegate { | 
|   53  public: |   53  public: | 
|   54   NetworkPortalNotificationControllerDelegate(): clicked_(false) {} |   54   NetworkPortalNotificationControllerDelegate(): clicked_(false) {} | 
|   55  |   55  | 
|   56   // Overridden from message_center::NotificationDelegate: |   56   // Overridden from message_center::NotificationDelegate: | 
|   57   virtual void Display() OVERRIDE; |   57   virtual void Display() override; | 
|   58   virtual void Error() OVERRIDE; |   58   virtual void Error() override; | 
|   59   virtual void Close(bool by_user) OVERRIDE; |   59   virtual void Close(bool by_user) override; | 
|   60   virtual void Click() OVERRIDE; |   60   virtual void Click() override; | 
|   61  |   61  | 
|   62  private: |   62  private: | 
|   63   virtual ~NetworkPortalNotificationControllerDelegate() {} |   63   virtual ~NetworkPortalNotificationControllerDelegate() {} | 
|   64  |   64  | 
|   65   bool clicked_; |   65   bool clicked_; | 
|   66  |   66  | 
|   67   DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationControllerDelegate); |   67   DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationControllerDelegate); | 
|   68 }; |   68 }; | 
|   69  |   69  | 
|   70 void NetworkPortalNotificationControllerDelegate::Display() { |   70 void NetworkPortalNotificationControllerDelegate::Display() { | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  175   if (ash::Shell::HasInstance()) { |  175   if (ash::Shell::HasInstance()) { | 
|  176     ash::Shell::GetInstance() |  176     ash::Shell::GetInstance() | 
|  177         ->system_tray_notifier() |  177         ->system_tray_notifier() | 
|  178         ->NotifyOnCaptivePortalDetected(network->path()); |  178         ->NotifyOnCaptivePortalDetected(network->path()); | 
|  179   } |  179   } | 
|  180  |  180  | 
|  181   message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |  181   message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 
|  182 } |  182 } | 
|  183  |  183  | 
|  184 }  // namespace chromeos |  184 }  // namespace chromeos | 
| OLD | NEW |