Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/service/cloud_print/cloud_print_proxy_backend.h" | 5 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 virtual void OnAuthFailed(); | 86 virtual void OnAuthFailed(); |
| 87 | 87 |
| 88 // notifier::TalkMediator::Delegate implementation. | 88 // notifier::TalkMediator::Delegate implementation. |
| 89 virtual void OnNotificationStateChange( | 89 virtual void OnNotificationStateChange( |
| 90 bool notifications_enabled); | 90 bool notifications_enabled); |
| 91 virtual void OnIncomingNotification( | 91 virtual void OnIncomingNotification( |
| 92 const notifier::Notification& notification); | 92 const notifier::Notification& notification); |
| 93 virtual void OnOutgoingNotification(); | 93 virtual void OnOutgoingNotification(); |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 friend class base::RefCountedThreadSafe<Core>; | |
| 97 | |
|
Scott Byer
2012/04/16 17:14:48
nit: extra line
| |
| 98 virtual ~Core() {} | |
| 99 | |
| 96 // NotifyXXX is how the Core communicates with the frontend across | 100 // NotifyXXX is how the Core communicates with the frontend across |
| 97 // threads. | 101 // threads. |
| 98 void NotifyPrinterListAvailable( | 102 void NotifyPrinterListAvailable( |
| 99 const printing::PrinterList& printer_list); | 103 const printing::PrinterList& printer_list); |
| 100 void NotifyAuthenticated( | 104 void NotifyAuthenticated( |
| 101 const std::string& robot_oauth_refresh_token, | 105 const std::string& robot_oauth_refresh_token, |
| 102 const std::string& robot_email, | 106 const std::string& robot_email, |
| 103 const std::string& user_email); | 107 const std::string& user_email); |
| 104 void NotifyAuthenticationFailed(); | 108 void NotifyAuthenticationFailed(); |
| 105 void NotifyPrintSystemUnavailable(); | 109 void NotifyPrintSystemUnavailable(); |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 464 void CloudPrintProxyBackend::Core::OnIncomingNotification( | 468 void CloudPrintProxyBackend::Core::OnIncomingNotification( |
| 465 const notifier::Notification& notification) { | 469 const notifier::Notification& notification) { |
| 466 DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop()); | 470 DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop()); |
| 467 VLOG(1) << "CP_CONNECTOR: Incoming notification."; | 471 VLOG(1) << "CP_CONNECTOR: Incoming notification."; |
| 468 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, | 472 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, |
| 469 notification.channel.c_str())) | 473 notification.channel.c_str())) |
| 470 HandlePrinterNotification(notification.data); | 474 HandlePrinterNotification(notification.data); |
| 471 } | 475 } |
| 472 | 476 |
| 473 void CloudPrintProxyBackend::Core::OnOutgoingNotification() {} | 477 void CloudPrintProxyBackend::Core::OnOutgoingNotification() {} |
| OLD | NEW |