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

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 10704049: Split out ContentViewCore from ContentView for embedders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_ANDROID_CONTENT_VIEW_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/android/jni_helper.h" 9 #include "base/android/jni_helper.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "content/public/browser/android/content_view.h" 15 #include "content/public/browser/android/content_view_core.h"
16 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 19
20 namespace content { 20 namespace content {
21 class ContentViewClient; 21 class ContentViewClient;
22 class RenderWidgetHostViewAndroid; 22 class RenderWidgetHostViewAndroid;
23 23
24 // TODO(jrg): this is a shell. Upstream the rest. 24 // TODO(jrg): this is a shell. Upstream the rest.
25 class ContentViewImpl : public ContentView, 25 class ContentViewCoreImpl : public ContentViewCore,
26 public NotificationObserver { 26 public NotificationObserver {
27 public: 27 public:
28 ContentViewImpl(JNIEnv* env, 28 ContentViewCoreImpl(JNIEnv* env,
29 jobject obj, 29 jobject obj,
30 WebContents* web_contents); 30 WebContents* web_contents);
31 virtual void Destroy(JNIEnv* env, jobject obj); 31 virtual void Destroy(JNIEnv* env, jobject obj);
32 32
33 // -------------------------------------------------------------------------- 33 // --------------------------------------------------------------------------
34 // Methods called from Java via JNI 34 // Methods called from Java via JNI
35 // -------------------------------------------------------------------------- 35 // --------------------------------------------------------------------------
36 36
37 void LoadUrlWithoutUrlSanitization(JNIEnv* env, 37 void LoadUrlWithoutUrlSanitization(JNIEnv* env,
38 jobject, 38 jobject,
39 jstring jurl, 39 jstring jurl,
40 int page_transition); 40 int page_transition);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 private: 96 private:
97 // NotificationObserver implementation. 97 // NotificationObserver implementation.
98 virtual void Observe(int type, 98 virtual void Observe(int type,
99 const NotificationSource& source, 99 const NotificationSource& source,
100 const NotificationDetails& details) OVERRIDE; 100 const NotificationDetails& details) OVERRIDE;
101 101
102 // -------------------------------------------------------------------------- 102 // --------------------------------------------------------------------------
103 // Private methods that call to Java via JNI 103 // Private methods that call to Java via JNI
104 // -------------------------------------------------------------------------- 104 // --------------------------------------------------------------------------
105 virtual ~ContentViewImpl(); 105 virtual ~ContentViewCoreImpl();
106 106
107 // -------------------------------------------------------------------------- 107 // --------------------------------------------------------------------------
108 // Other private methods and data 108 // Other private methods and data
109 // -------------------------------------------------------------------------- 109 // --------------------------------------------------------------------------
110 110
111 void PostLoadUrl(const GURL& url); 111 void PostLoadUrl(const GURL& url);
112 112
113 // Reference to the current WebContents used to determine how and what to 113 // Reference to the current WebContents used to determine how and what to
114 // display in the ContentView. 114 // display in the ContentViewCore.
115 WebContents* web_contents_; 115 WebContents* web_contents_;
116 116
117 // We only set this to be the delegate of the web_contents if we own it. 117 // We only set this to be the delegate of the web_contents if we own it.
118 scoped_ptr<ContentViewClient> content_view_client_; 118 scoped_ptr<ContentViewClient> content_view_client_;
119 119
120 // Whether the renderer backing this ContentView has crashed. 120 // Whether the renderer backing this ContentViewCore has crashed.
121 bool tab_crashed_; 121 bool tab_crashed_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(ContentViewImpl); 123 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
124 }; 124 };
125 125
126 bool RegisterContentView(JNIEnv* env); 126 bool RegisterContentViewCore(JNIEnv* env);
127 127
128 }; // namespace content 128 }; // namespace content
129 129
130 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_IMPL_H_ 130 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_client.cc ('k') | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698