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

Side by Side Diff: chrome/browser/services/gcm/push_messaging_service_impl.h

Issue 340773006: Dispatch push event to worker from PushServiceImpl#OnMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/services/gcm/push_messaging_service_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/gcm_driver/gcm_app_handler.h" 10 #include "components/gcm_driver/gcm_app_handler.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual void Register( 50 virtual void Register(
51 const GURL& origin, 51 const GURL& origin,
52 int64 service_worker_registration_id, 52 int64 service_worker_registration_id,
53 const std::string& sender_id, 53 const std::string& sender_id,
54 int renderer_id, 54 int renderer_id,
55 int render_frame_id, 55 int render_frame_id,
56 bool user_gesture, 56 bool user_gesture,
57 const content::PushMessagingService::RegisterCallback& callback) OVERRIDE; 57 const content::PushMessagingService::RegisterCallback& callback) OVERRIDE;
58 58
59 private: 59 private:
60 void DeliverMessageCallback(const PushMessagingApplicationId& application_id,
61 const GCMClient::IncomingMessage& message,
62 content::PushMessagingStatus status);
63
60 void RegisterEnd( 64 void RegisterEnd(
61 const content::PushMessagingService::RegisterCallback& callback, 65 const content::PushMessagingService::RegisterCallback& callback,
62 const std::string& registration_id, 66 const std::string& registration_id,
63 content::PushMessagingStatus status); 67 content::PushMessagingStatus status);
64 68
65 void DidRegister( 69 void DidRegister(
66 const content::PushMessagingService::RegisterCallback& callback, 70 const content::PushMessagingService::RegisterCallback& callback,
67 const std::string& registration_id, 71 const std::string& registration_id,
68 GCMClient::Result result); 72 GCMClient::Result result);
69 73
70 void DidRequestPermission( 74 void DidRequestPermission(
71 const PushMessagingApplicationId& application_id, 75 const PushMessagingApplicationId& application_id,
72 const std::string& sender_id, 76 const std::string& sender_id,
73 const content::PushMessagingService::RegisterCallback& callback, 77 const content::PushMessagingService::RegisterCallback& callback,
74 bool allow); 78 bool allow);
75 79
76 GCMProfileService* gcm_profile_service_; // It owns us. 80 GCMProfileService* gcm_profile_service_; // It owns us.
77 81
78 Profile* profile_; // It owns our owner. 82 Profile* profile_; // It owns our owner.
79 83
80 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; 84 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_;
81 85
82 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); 86 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl);
83 }; 87 };
84 88
85 } // namespace gcm 89 } // namespace gcm
86 90
87 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 91 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/services/gcm/push_messaging_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698