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

Side by Side Diff: blimp/client/public/contents/blimp_contents.h

Issue 2279403003: blimp: Hook up the layer holding the tab content into Chrome. (Closed)
Patch Set: Addressed 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
« no previous file with comments | « blimp/client/public/BUILD.gn ('k') | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CONTENTS_BLIMP_CONTENTS_H_ 5 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_
6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ 6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/supports_user_data.h" 9 #include "base/supports_user_data.h"
10 #include "ui/gfx/native_widget_types.h"
10 #include "url/gurl.h" 11 #include "url/gurl.h"
11 12
12 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
13 #include "base/android/scoped_java_ref.h" 14 #include "base/android/scoped_java_ref.h"
14 #endif 15 #endif
15 16
16 namespace blimp { 17 namespace blimp {
17 namespace client { 18 namespace client {
18 19
19 class BlimpContentsObserver; 20 class BlimpContentsObserver;
20 class BlimpNavigationController; 21 class BlimpNavigationController;
21 22
22 // BlimpContents is the core class in blimp client which is responsible for 23 // BlimpContents is the core class in blimp client which is responsible for
23 // rendering web pages in a rectangular area. The interaction with between the 24 // rendering web pages in a rectangular area. The interaction with between the
24 // client and engine is encapsulated behind this interface through the use of 25 // client and engine is encapsulated behind this interface through the use of
25 // the navigation controller. Each BlimpContents has exactly one 26 // the navigation controller. Each BlimpContents has exactly one
26 // BlimpNavigationController which can be used to load URLs, navigate 27 // BlimpNavigationController which can be used to load URLs, navigate
27 // backwards/forward etc. See blimp_navigation_controller.h for more details. 28 // backwards/forward etc. See blimp_navigation_controller.h for more details.
28 class BlimpContents : public base::SupportsUserData { 29 class BlimpContents : public base::SupportsUserData {
29 public: 30 public:
30 // Retrives the navigation controller that controls all navigation related 31 // Retrives the navigation controller that controls all navigation related
31 // to this BlimpContents. 32 // to this BlimpContents.
32 virtual BlimpNavigationController& GetNavigationController() = 0; 33 virtual BlimpNavigationController& GetNavigationController() = 0;
33 34
34 // Enables adding and removing observers to this BlimpContents. 35 // Enables adding and removing observers to this BlimpContents.
35 virtual void AddObserver(BlimpContentsObserver* observer) = 0; 36 virtual void AddObserver(BlimpContentsObserver* observer) = 0;
36 virtual void RemoveObserver(BlimpContentsObserver* observer) = 0; 37 virtual void RemoveObserver(BlimpContentsObserver* observer) = 0;
37 38
39 // Returns the native view that holds the contents of this tab.
40 virtual gfx::NativeView GetNativeView() = 0;
41
38 #if defined(OS_ANDROID) 42 #if defined(OS_ANDROID)
39 // Returns a Java object of the type BlimpContents for the given 43 // Returns a Java object of the type BlimpContents for the given
40 // BlimpContents. 44 // BlimpContents.
41 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; 45 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
42 #endif 46 #endif
43 47
44 protected: 48 protected:
45 BlimpContents() {} 49 BlimpContents() {}
46 50
47 private: 51 private:
48 DISALLOW_COPY_AND_ASSIGN(BlimpContents); 52 DISALLOW_COPY_AND_ASSIGN(BlimpContents);
49 }; 53 };
50 54
51 } // namespace client 55 } // namespace client
52 } // namespace blimp 56 } // namespace blimp
53 57
54 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ 58 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_
OLDNEW
« no previous file with comments | « blimp/client/public/BUILD.gn ('k') | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698