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

Side by Side Diff: blimp/client/core/blimp_client_context_impl.h

Issue 2201433002: Migrate TabControlFeature from 0.5 to 0.6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git add blimp/client/public/contents/blimp_contents_observer.cc 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ 5 #ifndef BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_
6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ 6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "blimp/client/core/session/client_network_components.h" 15 #include "blimp/client/core/session/client_network_components.h"
16 #include "blimp/client/core/session/network_event_observer.h" 16 #include "blimp/client/core/session/network_event_observer.h"
17 #include "blimp/client/public/blimp_client_context.h" 17 #include "blimp/client/public/blimp_client_context.h"
18 #include "blimp/client/public/contents/blimp_contents.h" 18 #include "blimp/client/public/contents/blimp_contents.h"
19 #include "blimp/net/blimp_connection_statistics.h" 19 #include "blimp/net/blimp_connection_statistics.h"
20 #include "blimp/net/thread_pipe_manager.h" 20 #include "blimp/net/thread_pipe_manager.h"
21 21
22 namespace blimp { 22 namespace blimp {
23 namespace client { 23 namespace client {
24 24
25 class BlimpContentsManager;
26
27 #if defined(OS_ANDROID)
28 class BlimpClientContextImplAndroid;
nyquist 2016/08/05 23:03:22 Is this still necessary?
Menglin 2016/08/06 00:57:00 none. deleted it
29 #endif // defined(OS_ANDROID)
30
25 // BlimpClientContextImpl is the implementation of the main context-class for 31 // BlimpClientContextImpl is the implementation of the main context-class for
26 // the blimp client. 32 // the blimp client.
27 class BlimpClientContextImpl : public BlimpClientContext, 33 class BlimpClientContextImpl : public BlimpClientContext,
28 public NetworkEventObserver { 34 public NetworkEventObserver {
29 public: 35 public:
30 // The |io_thread_task_runner| must be the task runner to use for IO 36 // The |io_thread_task_runner| must be the task runner to use for IO
31 // operations. 37 // operations.
32 explicit BlimpClientContextImpl( 38 explicit BlimpClientContextImpl(
33 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner); 39 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner);
34 ~BlimpClientContextImpl() override; 40 ~BlimpClientContextImpl() override;
(...skipping 10 matching lines...) Expand all
45 // Provides functionality from the embedder. 51 // Provides functionality from the embedder.
46 BlimpClientContextDelegate* delegate_; 52 BlimpClientContextDelegate* delegate_;
47 53
48 // The task runner to use for IO operations. 54 // The task runner to use for IO operations.
49 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; 55 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
50 56
51 // Collects details of network, such as number of commits and bytes 57 // Collects details of network, such as number of commits and bytes
52 // transferred over network. Owned by ClientNetworkComponents. 58 // transferred over network. Owned by ClientNetworkComponents.
53 BlimpConnectionStatistics* blimp_connection_statistics_; 59 BlimpConnectionStatistics* blimp_connection_statistics_;
54 60
61 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_;
62
55 // Container struct for network components. 63 // Container struct for network components.
56 // Must be deleted on the IO thread. 64 // Must be deleted on the IO thread.
57 std::unique_ptr<ClientNetworkComponents> net_components_; 65 std::unique_ptr<ClientNetworkComponents> net_components_;
58 66
59 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; 67 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
60 68
61 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; 69 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
62 70
63 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); 71 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);
64 }; 72 };
65 73
66 } // namespace client 74 } // namespace client
67 } // namespace blimp 75 } // namespace blimp
68 76
69 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ 77 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698