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

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

Issue 14018004: [Android] Refactor NativeView to be able to use it for AutofillDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove space + useless comment Created 7 years, 8 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_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_helper.h" 10 #include "base/android/jni_helper.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/i18n/rtl.h" 13 #include "base/i18n/rtl.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/process.h" 15 #include "base/process.h"
16 #include "content/browser/renderer_host/render_widget_host_view_android.h" 16 #include "content/browser/renderer_host/render_widget_host_view_android.h"
17 #include "content/browser/web_contents/web_contents_impl.h" 17 #include "content/browser/web_contents/web_contents_impl.h"
18 #include "content/public/browser/android/content_view_core.h" 18 #include "content/public/browser/android/content_view_core.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
21 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
23 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
24 #include "ui/gfx/rect_f.h" 24 #include "ui/gfx/rect_f.h"
25 25
26 struct WebMenuItem; 26 struct WebMenuItem;
27 27
28 namespace ui { 28 namespace ui {
29 class ViewAndroid;
29 class WindowAndroid; 30 class WindowAndroid;
30 } 31 }
31 32
32 namespace content { 33 namespace content {
33 class RenderWidgetHostViewAndroid; 34 class RenderWidgetHostViewAndroid;
34 class SyncInputEventFilter; 35 class SyncInputEventFilter;
35 36
36 // TODO(jrg): this is a shell. Upstream the rest. 37 // TODO(jrg): this is a shell. Upstream the rest.
37 class ContentViewCoreImpl : public ContentViewCore, 38 class ContentViewCoreImpl : public ContentViewCore,
38 public NotificationObserver { 39 public NotificationObserver {
39 public: 40 public:
40 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); 41 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents);
41 ContentViewCoreImpl(JNIEnv* env, 42 ContentViewCoreImpl(JNIEnv* env,
42 jobject obj, 43 jobject obj,
43 bool hardware_accelerated, 44 bool hardware_accelerated,
44 bool input_events_delivered_at_vsync, 45 bool input_events_delivered_at_vsync,
45 WebContents* web_contents, 46 WebContents* web_contents,
47 ui::ViewAndroid* view_android,
46 ui::WindowAndroid* window_android); 48 ui::WindowAndroid* window_android);
47 49
48 // ContentViewCore implementation. 50 // ContentViewCore implementation.
49 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; 51 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE;
50 virtual base::android::ScopedJavaLocalRef<jobject> GetContainerViewDelegate()
51 OVERRIDE;
52 virtual WebContents* GetWebContents() const OVERRIDE; 52 virtual WebContents* GetWebContents() const OVERRIDE;
53 virtual ui::ViewAndroid* GetViewAndroid() const OVERRIDE;
53 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE; 54 virtual ui::WindowAndroid* GetWindowAndroid() const OVERRIDE;
54 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; 55 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE;
55 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; 56 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE;
56 virtual void OnWebPreferencesUpdated() OVERRIDE; 57 virtual void OnWebPreferencesUpdated() OVERRIDE;
57 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; 58 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE;
58 virtual void ShowPastePopup(int x, int y) OVERRIDE; 59 virtual void ShowPastePopup(int x, int y) OVERRIDE;
59 virtual unsigned int GetScaledContentTexture( 60 virtual unsigned int GetScaledContentTexture(
60 float scale, 61 float scale,
61 gfx::Size* out_size) OVERRIDE; 62 gfx::Size* out_size) OVERRIDE;
62 virtual float GetDpiScale() const OVERRIDE; 63 virtual float GetDpiScale() const OVERRIDE;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 334
334 // Whether the renderer backing this ContentViewCore has crashed. 335 // Whether the renderer backing this ContentViewCore has crashed.
335 bool tab_crashed_; 336 bool tab_crashed_;
336 337
337 // Whether input events will be consistently delivered at vsync time. 338 // Whether input events will be consistently delivered at vsync time.
338 bool input_events_delivered_at_vsync_; 339 bool input_events_delivered_at_vsync_;
339 340
340 // Device scale factor. 341 // Device scale factor.
341 float dpi_scale_; 342 float dpi_scale_;
342 343
344 // The Android view that can be used to add and remove decoration layers
345 // like AutofillPopup.
346 ui::ViewAndroid* view_android_;
347
343 // The owning window that has a hold of main application activity. 348 // The owning window that has a hold of main application activity.
344 ui::WindowAndroid* window_android_; 349 ui::WindowAndroid* window_android_;
345 350
346 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_; 351 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_;
347 352
348 // Optional browser-side input event filtering. 353 // Optional browser-side input event filtering.
349 scoped_ptr<SyncInputEventFilter> input_event_filter_; 354 scoped_ptr<SyncInputEventFilter> input_event_filter_;
350 355
351 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 356 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
352 }; 357 };
353 358
354 bool RegisterContentViewCore(JNIEnv* env); 359 bool RegisterContentViewCore(JNIEnv* env);
355 360
356 } // namespace content 361 } // namespace content
357 362
358 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 363 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698