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

Side by Side Diff: blimp/client/session/blimp_client_session.h

Issue 2249283003: Hooks together Geolocation Feature in the Client and Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lai
Patch Set: In response to Wez's #48 comments. Created 4 years, 3 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
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 BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_ 5 #ifndef BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_
6 #define BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_ 6 #define BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "blimp/client/core/compositor/blob_image_serialization_processor.h" 15 #include "blimp/client/core/compositor/blob_image_serialization_processor.h"
16 #include "blimp/client/core/session/assignment_source.h" 16 #include "blimp/client/core/session/assignment_source.h"
17 #include "blimp/client/core/session/network_event_observer.h" 17 #include "blimp/client/core/session/network_event_observer.h"
18 #include "blimp/client/public/session/assignment.h" 18 #include "blimp/client/public/session/assignment.h"
19 #include "blimp/common/proto/blimp_message.pb.h" 19 #include "blimp/common/proto/blimp_message.pb.h"
20 #include "blimp/net/blimp_message_processor.h" 20 #include "blimp/net/blimp_message_processor.h"
21 #include "device/geolocation/geolocation_delegate.h"
21 22
22 namespace net { 23 namespace net {
23 class IPEndPoint; 24 class IPEndPoint;
24 } 25 }
25 26
26 namespace blimp { 27 namespace blimp {
27 28
28 class BlimpMessageProcessor; 29 class BlimpMessageProcessor;
29 class BlimpMessageThreadPipe; 30 class BlimpMessageThreadPipe;
30 class BlobChannelReceiver; 31 class BlobChannelReceiver;
31 class BrowserConnectionHandler; 32 class BrowserConnectionHandler;
32 class ClientConnectionManager; 33 class ClientConnectionManager;
33 class HeliumBlobReceiverDelegate; 34 class HeliumBlobReceiverDelegate;
34 class ThreadPipeManager; 35 class ThreadPipeManager;
35 36
36 namespace client { 37 namespace client {
37 38
38 class ClientNetworkComponents; 39 class ClientNetworkComponents;
40 class GeolocationFeature;
39 class NavigationFeature; 41 class NavigationFeature;
40 class ImeFeature; 42 class ImeFeature;
41 class RenderWidgetFeature; 43 class RenderWidgetFeature;
42 class SettingsFeature; 44 class SettingsFeature;
43 class TabControlFeature; 45 class TabControlFeature;
44 46
45 // BlimpClientSession represents a single active session of Blimp on the client 47 // BlimpClientSession represents a single active session of Blimp on the client
46 // regardless of whether or not the client application is in the background or 48 // regardless of whether or not the client application is in the background or
47 // foreground. The only time this session is invalid is during initialization 49 // foreground. The only time this session is invalid is during initialization
48 // and shutdown of this particular client process (or Activity on Android). 50 // and shutdown of this particular client process (or Activity on Android).
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 98
97 // Receives blob BlimpMessages and relays them to BlobChannelReceiver. 99 // Receives blob BlimpMessages and relays them to BlobChannelReceiver.
98 // Owned by BlobChannelReceiver, therefore stored as a raw pointer here. 100 // Owned by BlobChannelReceiver, therefore stored as a raw pointer here.
99 HeliumBlobReceiverDelegate* blob_delegate_ = nullptr; 101 HeliumBlobReceiverDelegate* blob_delegate_ = nullptr;
100 102
101 // Retrieves and decodes image data from |blob_receiver_|. Must outlive 103 // Retrieves and decodes image data from |blob_receiver_|. Must outlive
102 // |blob_receiver_|. 104 // |blob_receiver_|.
103 BlobImageSerializationProcessor blob_image_processor_; 105 BlobImageSerializationProcessor blob_image_processor_;
104 106
105 std::unique_ptr<BlobChannelReceiver> blob_receiver_; 107 std::unique_ptr<BlobChannelReceiver> blob_receiver_;
108 std::unique_ptr<device::GeolocationDelegate> geolocation_delegate_;
109 std::unique_ptr<GeolocationFeature> geolocation_feature_;
106 std::unique_ptr<TabControlFeature> tab_control_feature_; 110 std::unique_ptr<TabControlFeature> tab_control_feature_;
107 std::unique_ptr<NavigationFeature> navigation_feature_; 111 std::unique_ptr<NavigationFeature> navigation_feature_;
108 std::unique_ptr<ImeFeature> ime_feature_; 112 std::unique_ptr<ImeFeature> ime_feature_;
109 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; 113 std::unique_ptr<RenderWidgetFeature> render_widget_feature_;
110 std::unique_ptr<SettingsFeature> settings_feature_; 114 std::unique_ptr<SettingsFeature> settings_feature_;
111 115
112 // The AssignmentSource is used when the user of BlimpClientSession calls 116 // The AssignmentSource is used when the user of BlimpClientSession calls
113 // Connect() to get a valid assignment and later connect to the engine. 117 // Connect() to get a valid assignment and later connect to the engine.
114 std::unique_ptr<AssignmentSource> assignment_source_; 118 std::unique_ptr<AssignmentSource> assignment_source_;
115 119
116 // Container struct for network components. 120 // Container struct for network components.
117 // Must be deleted on the IO thread. 121 // Must be deleted on the IO thread.
118 std::unique_ptr<ClientNetworkComponents> net_components_; 122 std::unique_ptr<ClientNetworkComponents> net_components_;
119 123
120 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; 124 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
121 125
122 base::WeakPtrFactory<BlimpClientSession> weak_factory_; 126 base::WeakPtrFactory<BlimpClientSession> weak_factory_;
123 127
124 DISALLOW_COPY_AND_ASSIGN(BlimpClientSession); 128 DISALLOW_COPY_AND_ASSIGN(BlimpClientSession);
125 }; 129 };
126 130
127 } // namespace client 131 } // namespace client
128 } // namespace blimp 132 } // namespace blimp
129 133
130 #endif // BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_ 134 #endif // BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698