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

Side by Side Diff: content/renderer/presentation/presentation_dispatcher.h

Issue 1457963002: Use scoped_ptr instead of linked_ptr from /content/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile error Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "base/memory/linked_ptr.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
16 #include "content/common/presentation/presentation_service.mojom.h" 15 #include "content/common/presentation/presentation_service.mojom.h"
17 #include "content/public/renderer/render_frame_observer.h" 16 #include "content/public/renderer/render_frame_observer.h"
18 #include "mojo/public/cpp/bindings/binding.h" 17 #include "mojo/public/cpp/bindings/binding.h"
19 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nClient.h" 18 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nClient.h"
20 19
21 namespace blink { 20 namespace blink {
22 class WebPresentationAvailabilityObserver; 21 class WebPresentationAvailabilityObserver;
23 class WebString; 22 class WebString;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 117
119 void UpdateListeningState(); 118 void UpdateListeningState();
120 119
121 // Used as a weak reference. Can be null since lifetime is bound to the frame. 120 // Used as a weak reference. Can be null since lifetime is bound to the frame.
122 blink::WebPresentationController* controller_; 121 blink::WebPresentationController* controller_;
123 presentation::PresentationServicePtr presentation_service_; 122 presentation::PresentationServicePtr presentation_service_;
124 mojo::Binding<presentation::PresentationServiceClient> binding_; 123 mojo::Binding<presentation::PresentationServiceClient> binding_;
125 124
126 // Message requests are queued here and only one message at a time is sent 125 // Message requests are queued here and only one message at a time is sent
127 // over mojo channel. 126 // over mojo channel.
128 using MessageRequestQueue = std::queue<linked_ptr<SendMessageRequest>>; 127 using MessageRequestQueue = std::queue<scoped_ptr<SendMessageRequest>>;
129 MessageRequestQueue message_request_queue_; 128 MessageRequestQueue message_request_queue_;
130 129
131 enum class ListeningState { 130 enum class ListeningState {
132 INACTIVE, 131 INACTIVE,
133 WAITING, 132 WAITING,
134 ACTIVE, 133 ACTIVE,
135 }; 134 };
136 135
137 using AvailabilityCallbacksMap = 136 using AvailabilityCallbacksMap =
138 IDMap<blink::WebPresentationAvailabilityCallbacks, IDMapOwnPointer>; 137 IDMap<blink::WebPresentationAvailabilityCallbacks, IDMapOwnPointer>;
(...skipping 17 matching lines...) Expand all
156 // Updates the listening state of availability for |status| and notifies the 155 // Updates the listening state of availability for |status| and notifies the
157 // client. 156 // client.
158 void UpdateListeningState(AvailabilityStatus* status); 157 void UpdateListeningState(AvailabilityStatus* status);
159 158
160 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher); 159 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher);
161 }; 160 };
162 161
163 } // namespace content 162 } // namespace content
164 163
165 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 164 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/video_decoder_shim.cc ('k') | content/renderer/presentation/presentation_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698