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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc

Issue 10537158: Add support for Ash to Notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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) 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/browser/printing/cloud_print/cloud_print_proxy_service.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
6 6
7 #include <stack> 7 #include <stack>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 20 matching lines...) Expand all
31 using content::BrowserThread; 31 using content::BrowserThread;
32 32
33 class CloudPrintProxyService::TokenExpiredNotificationDelegate 33 class CloudPrintProxyService::TokenExpiredNotificationDelegate
34 : public NotificationDelegate { 34 : public NotificationDelegate {
35 public: 35 public:
36 explicit TokenExpiredNotificationDelegate( 36 explicit TokenExpiredNotificationDelegate(
37 CloudPrintProxyService* cloud_print_service) 37 CloudPrintProxyService* cloud_print_service)
38 : cloud_print_service_(cloud_print_service) { 38 : cloud_print_service_(cloud_print_service) {
39 } 39 }
40 40
41 void Display() {} 41 virtual void Display() OVERRIDE {}
42 42
43 void Error() { 43 virtual void Error() OVERRIDE {
44 cloud_print_service_->OnTokenExpiredNotificationError(); 44 cloud_print_service_->OnTokenExpiredNotificationError();
45 } 45 }
46 46
47 void Close(bool by_user) { 47 virtual void Close(bool by_user) OVERRIDE {
48 cloud_print_service_->OnTokenExpiredNotificationClosed(by_user); 48 cloud_print_service_->OnTokenExpiredNotificationClosed(by_user);
49 } 49 }
50 50
51 void Click() { 51 virtual void Click() OVERRIDE {
52 cloud_print_service_->OnTokenExpiredNotificationClick(); 52 cloud_print_service_->OnTokenExpiredNotificationClick();
53 } 53 }
54 54
55 std::string id() const { return "cloudprint.tokenexpired"; } 55 virtual std::string id() const OVERRIDE {
56 return "cloudprint.tokenexpired";
57 }
58
59 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE {
60 return NULL;
61 }
56 62
57 private: 63 private:
58 virtual ~TokenExpiredNotificationDelegate() {} 64 virtual ~TokenExpiredNotificationDelegate() {}
59 65
60 CloudPrintProxyService* cloud_print_service_; 66 CloudPrintProxyService* cloud_print_service_;
61 DISALLOW_COPY_AND_ASSIGN(TokenExpiredNotificationDelegate); 67 DISALLOW_COPY_AND_ASSIGN(TokenExpiredNotificationDelegate);
62 }; 68 };
63 69
64 CloudPrintProxyService::CloudPrintProxyService(Profile* profile) 70 CloudPrintProxyService::CloudPrintProxyService(Profile* profile)
65 : profile_(profile), 71 : profile_(profile),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 269 }
264 270
265 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) { 271 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) {
266 GetServiceProcessControl()->Launch(task, base::Closure()); 272 GetServiceProcessControl()->Launch(task, base::Closure());
267 return true; 273 return true;
268 } 274 }
269 275
270 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() { 276 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() {
271 return ServiceProcessControl::GetInstance(); 277 return ServiceProcessControl::GetInstance();
272 } 278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698