| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 Profile* signin_profile = ProfileHelper::GetSigninProfile(); | 304 Profile* signin_profile = ProfileHelper::GetSigninProfile(); |
| 305 dialog_ = new NetworkPortalWebDialog(AsWeakPtr()); | 305 dialog_ = new NetworkPortalWebDialog(AsWeakPtr()); |
| 306 dialog_->SetWidget(views::Widget::GetWidgetForNativeWindow( | 306 dialog_->SetWidget(views::Widget::GetWidgetForNativeWindow( |
| 307 chrome::ShowWebDialog(nullptr, signin_profile, dialog_))); | 307 chrome::ShowWebDialog(nullptr, signin_profile, dialog_))); |
| 308 } | 308 } |
| 309 | 309 |
| 310 void NetworkPortalNotificationController::OnDialogDestroyed( | 310 void NetworkPortalNotificationController::OnDialogDestroyed( |
| 311 const NetworkPortalWebDialog* dialog) { | 311 const NetworkPortalWebDialog* dialog) { |
| 312 if (dialog == dialog_) { | 312 if (dialog == dialog_) { |
| 313 dialog_ = nullptr; | 313 dialog_ = nullptr; |
| 314 ProfileHelper::Get()->ClearSigninProfile(base::Closure()); | 314 ProfileHelper::Get()->ClearSigninProfile(base::Closure(), nullptr); |
| 315 } | 315 } |
| 316 } | 316 } |
| 317 | 317 |
| 318 scoped_ptr<message_center::Notification> | 318 scoped_ptr<message_center::Notification> |
| 319 NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification( | 319 NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification( |
| 320 const NetworkState* network) { | 320 const NetworkState* network) { |
| 321 message_center::RichNotificationData data; | 321 message_center::RichNotificationData data; |
| 322 scoped_refptr<NetworkPortalNotificationControllerDelegate> delegate( | 322 scoped_refptr<NetworkPortalNotificationControllerDelegate> delegate( |
| 323 new NetworkPortalNotificationControllerDelegate( | 323 new NetworkPortalNotificationControllerDelegate( |
| 324 std::string(), network->guid(), AsWeakPtr())); | 324 std::string(), network->guid(), AsWeakPtr())); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 if (dialog_) | 426 if (dialog_) |
| 427 dialog_->Close(); | 427 dialog_->Close(); |
| 428 } | 428 } |
| 429 | 429 |
| 430 const NetworkPortalWebDialog* | 430 const NetworkPortalWebDialog* |
| 431 NetworkPortalNotificationController::GetDialogForTesting() const { | 431 NetworkPortalNotificationController::GetDialogForTesting() const { |
| 432 return dialog_; | 432 return dialog_; |
| 433 } | 433 } |
| 434 | 434 |
| 435 } // namespace chromeos | 435 } // namespace chromeos |
| OLD | NEW |