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

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

Issue 2187893002: Move more client network code to //blimp/client/core/session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more explanatory comments Created 4 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
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/threading/thread.h" 14 #include "base/threading/thread.h"
14 #include "blimp/client/core/compositor/blob_image_serialization_processor.h" 15 #include "blimp/client/core/compositor/blob_image_serialization_processor.h"
15 #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"
16 #include "blimp/common/proto/blimp_message.pb.h" 18 #include "blimp/common/proto/blimp_message.pb.h"
17 #include "blimp/net/blimp_connection_statistics.h" 19 #include "blimp/net/blimp_connection_statistics.h"
18 #include "blimp/net/blimp_message_processor.h" 20 #include "blimp/net/blimp_message_processor.h"
19 21
20 namespace net { 22 namespace net {
21 class IPEndPoint; 23 class IPEndPoint;
22 } 24 }
23 25
24 namespace blimp { 26 namespace blimp {
25 27
26 class BlimpMessageProcessor; 28 class BlimpMessageProcessor;
27 class BlimpMessageThreadPipe; 29 class BlimpMessageThreadPipe;
28 class BlobChannelReceiver; 30 class BlobChannelReceiver;
29 class BrowserConnectionHandler; 31 class BrowserConnectionHandler;
30 class ClientConnectionManager; 32 class ClientConnectionManager;
31 class HeliumBlobReceiverDelegate; 33 class HeliumBlobReceiverDelegate;
32 class ThreadPipeManager; 34 class ThreadPipeManager;
33 35
34 namespace client { 36 namespace client {
35 37
36 class ClientNetworkComponents; 38 class ClientNetworkComponents;
37 class NavigationFeature; 39 class NavigationFeature;
38 class ImeFeature; 40 class ImeFeature;
39 class RenderWidgetFeature; 41 class RenderWidgetFeature;
40 class SettingsFeature; 42 class SettingsFeature;
41 class TabControlFeature; 43 class TabControlFeature;
42 44
43 class NetworkEventObserver {
44 public:
45 NetworkEventObserver() {}
46 virtual ~NetworkEventObserver() {}
47
48 virtual void OnConnected() = 0;
49 virtual void OnDisconnected(int result) = 0;
50 };
51
52 // BlimpClientSession represents a single active session of Blimp on the client 45 // BlimpClientSession represents a single active session of Blimp on the client
53 // regardless of whether or not the client application is in the background or 46 // regardless of whether or not the client application is in the background or
54 // foreground. The only time this session is invalid is during initialization 47 // foreground. The only time this session is invalid is during initialization
55 // and shutdown of this particular client process (or Activity on Android). 48 // and shutdown of this particular client process (or Activity on Android).
56 // 49 //
57 // This session glues together the feature proxy components and the network 50 // This session glues together the feature proxy components and the network
58 // layer. The network components must be interacted with on the IO thread. The 51 // layer. The network components must be interacted with on the IO thread. The
59 // feature proxies must be interacted with on the UI thread. 52 // feature proxies must be interacted with on the UI thread.
60 class BlimpClientSession 53 class BlimpClientSession
61 : public NetworkEventObserver, 54 : public NetworkEventObserver,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 127
135 base::WeakPtrFactory<BlimpClientSession> weak_factory_; 128 base::WeakPtrFactory<BlimpClientSession> weak_factory_;
136 129
137 DISALLOW_COPY_AND_ASSIGN(BlimpClientSession); 130 DISALLOW_COPY_AND_ASSIGN(BlimpClientSession);
138 }; 131 };
139 132
140 } // namespace client 133 } // namespace client
141 } // namespace blimp 134 } // namespace blimp
142 135
143 #endif // BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_ 136 #endif // BLIMP_CLIENT_SESSION_BLIMP_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « blimp/client/core/session/network_event_observer.h ('k') | blimp/client/session/blimp_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698