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

Side by Side Diff: blimp/client/public/blimp_client_context.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_PUBLIC_BLIMP_CLIENT_CONTEXT_H_ 5 #ifndef BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_
6 #define BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_ 6 #define BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "blimp/client/public/blimp_client_context_delegate.h" 13 #include "blimp/client/public/blimp_client_context_delegate.h"
14 #include "blimp/client/public/contents/blimp_contents.h" 14 #include "blimp/client/public/contents/blimp_contents.h"
15 #include "components/keyed_service/core/keyed_service.h" 15 #include "components/keyed_service/core/keyed_service.h"
16 #include "ui/gfx/native_widget_types.h"
16 17
17 #if defined(OS_ANDROID) 18 #if defined(OS_ANDROID)
18 #include "base/android/jni_android.h" 19 #include "base/android/jni_android.h"
19 #endif // defined(OS_ANDROID) 20 #endif // defined(OS_ANDROID)
20 21
21 namespace base { 22 namespace base {
22 class SupportsUserData; 23 class SupportsUserData;
23 } 24 }
24 25
25 namespace blimp { 26 namespace blimp {
(...skipping 23 matching lines...) Expand all
49 // |compositor_dependencies| is a support object that provides all embedder 50 // |compositor_dependencies| is a support object that provides all embedder
50 // dependencies required by internal compositors. 51 // dependencies required by internal compositors.
51 static BlimpClientContext* Create( 52 static BlimpClientContext* Create(
52 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 53 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
53 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 54 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
54 std::unique_ptr<CompositorDependencies> compositor_dependencies); 55 std::unique_ptr<CompositorDependencies> compositor_dependencies);
55 56
56 // The delegate provides all the required functionality from the embedder. 57 // The delegate provides all the required functionality from the embedder.
57 virtual void SetDelegate(BlimpClientContextDelegate* delegate) = 0; 58 virtual void SetDelegate(BlimpClientContextDelegate* delegate) = 0;
58 59
59 // Creates a new BlimpContents. 60 // Creates a new BlimpContents that will be shown in |window|.
60 // TODO(mlliu): Currently we want to have a single BlimpContents. If there is 61 // TODO(mlliu): Currently we want to have a single BlimpContents. If there is
61 // an existing contents, return nullptr (http://crbug.com/642558). 62 // an existing contents, return nullptr (http://crbug.com/642558).
62 virtual std::unique_ptr<BlimpContents> CreateBlimpContents() = 0; 63 virtual std::unique_ptr<BlimpContents> CreateBlimpContents(
64 gfx::NativeWindow window) = 0;
63 65
64 // Start authentication flow and connection to engine. 66 // Start authentication flow and connection to engine.
65 virtual void Connect() = 0; 67 virtual void Connect() = 0;
66 68
67 protected: 69 protected:
68 BlimpClientContext() = default; 70 BlimpClientContext() = default;
69 71
70 private: 72 private:
71 DISALLOW_COPY_AND_ASSIGN(BlimpClientContext); 73 DISALLOW_COPY_AND_ASSIGN(BlimpClientContext);
72 }; 74 };
73 75
74 } // namespace client 76 } // namespace client
75 } // namespace blimp 77 } // namespace blimp
76 78
77 #endif // BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_ 79 #endif // BLIMP_CLIENT_PUBLIC_BLIMP_CLIENT_CONTEXT_H_
OLDNEW
« no previous file with comments | « blimp/client/public/android/java/src/org/chromium/blimp_public/contents/BlimpContents.java ('k') | blimp/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698