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

Side by Side Diff: blimp/client/core/contents/blimp_contents_manager.h

Issue 2270323004: Add BlimpView to a Chrome tab when Blimp is enabled. (Closed)
Patch Set: addressed nit, renamed CreateForTesting and piped through touch handling 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 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_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_
6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "blimp/client/core/contents/blimp_contents_impl.h"
12 #include "ui/gfx/native_widget_types.h"
11 13
12 namespace blimp { 14 namespace blimp {
13 namespace client { 15 namespace client {
14 16
15 class BlimpCompositorDependencies; 17 class BlimpCompositorDependencies;
16 class BlimpContents; 18 class BlimpContents;
17 class BlimpContentsImpl; 19 class BlimpContentsImpl;
18 class ImeFeature; 20 class ImeFeature;
19 class NavigationFeature; 21 class NavigationFeature;
20 class RenderWidgetFeature; 22 class RenderWidgetFeature;
21 class TabControlFeature; 23 class TabControlFeature;
22 24
23 // BlimpContentsManager does the real work of creating BlimpContentsImpl, and 25 // BlimpContentsManager does the real work of creating BlimpContentsImpl, and
24 // then passes the ownership to the caller. It also owns the observers to 26 // then passes the ownership to the caller. It also owns the observers to
25 // monitor the life time of the contents it creates. 27 // monitor the life time of the contents it creates.
26 class BlimpContentsManager { 28 class BlimpContentsManager {
27 public: 29 public:
28 explicit BlimpContentsManager( 30 explicit BlimpContentsManager(
29 BlimpCompositorDependencies* blimp_compositor_dependencies, 31 BlimpCompositorDependencies* blimp_compositor_dependencies,
30 ImeFeature* ime_feature, 32 ImeFeature* ime_feature,
31 NavigationFeature* nav_feature, 33 NavigationFeature* nav_feature,
32 RenderWidgetFeature* render_widget_feature, 34 RenderWidgetFeature* render_widget_feature,
33 TabControlFeature* tab_control_feature); 35 TabControlFeature* tab_control_feature);
34 ~BlimpContentsManager(); 36 ~BlimpContentsManager();
35 37
36 // Builds a BlimpContentsImpl and notifies the engine. 38 // Builds a BlimpContentsImpl and notifies the engine.
37 // TODO(mlliu): Currently we want to have a single BlimpContents. If there is 39 // TODO(mlliu): Currently we want to have a single BlimpContents. If there is
38 // an existing contents, return nullptr (http://crbug.com/642558). 40 // an existing contents, return nullptr (http://crbug.com/642558).
39 std::unique_ptr<BlimpContentsImpl> CreateBlimpContents(); 41 std::unique_ptr<BlimpContentsImpl> CreateBlimpContents(
42 gfx::NativeWindow window);
40 43
41 // The caller can query the contents through its id. 44 // The caller can query the contents through its id.
42 BlimpContentsImpl* GetBlimpContents(int id); 45 BlimpContentsImpl* GetBlimpContents(int id);
43 46
44 private: 47 private:
45 class BlimpContentsDeletionObserver; 48 class BlimpContentsDeletionObserver;
46 friend class BlimpContentsDeletionObserver; 49 friend class BlimpContentsDeletionObserver;
47 50
48 // When creating the BlimpContentsImpl, an id is created for the content. 51 // When creating the BlimpContentsImpl, an id is created for the content.
49 int CreateBlimpContentsId(); 52 int CreateBlimpContentsId();
(...skipping 26 matching lines...) Expand all
76 79
77 base::WeakPtrFactory<BlimpContentsManager> weak_ptr_factory_; 80 base::WeakPtrFactory<BlimpContentsManager> weak_ptr_factory_;
78 81
79 DISALLOW_COPY_AND_ASSIGN(BlimpContentsManager); 82 DISALLOW_COPY_AND_ASSIGN(BlimpContentsManager);
80 }; 83 };
81 84
82 } // namespace client 85 } // namespace client
83 } // namespace blimp 86 } // namespace blimp
84 87
85 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_ 88 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_MANAGER_H_
OLDNEW
« no previous file with comments | « blimp/client/core/contents/blimp_contents_impl_unittest.cc ('k') | blimp/client/core/contents/blimp_contents_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698