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

Side by Side Diff: ui/android/view_android.h

Issue 2708703004: Reland "Refactor ContentViewClient (4/6)" (Closed)
Patch Set: rebased Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_ANDROID_VIEW_ANDROID_H_ 5 #ifndef UI_ANDROID_VIEW_ANDROID_H_
6 #define UI_ANDROID_VIEW_ANDROID_H_ 6 #define UI_ANDROID_VIEW_ANDROID_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "ui/android/ui_android_export.h" 12 #include "ui/android/ui_android_export.h"
13 #include "ui/gfx/geometry/rect_f.h" 13 #include "ui/gfx/geometry/rect_f.h"
14 14
15 class GURL;
16
15 namespace cc { 17 namespace cc {
16 class Layer; 18 class Layer;
17 } 19 }
18 20
19 namespace ui { 21 namespace ui {
20 22
21 class WindowAndroid; 23 class WindowAndroid;
22 24
23 // A simple container for a UI layer. 25 // A simple container for a UI layer.
24 // At the root of the hierarchy is a WindowAndroid, when attached. 26 // At the root of the hierarchy is a WindowAndroid, when attached.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 85
84 // Adds this view as a child of another view. 86 // Adds this view as a child of another view.
85 void AddChild(ViewAndroid* child); 87 void AddChild(ViewAndroid* child);
86 88
87 // Detaches this view from its parent. 89 // Detaches this view from its parent.
88 void RemoveFromParent(); 90 void RemoveFromParent();
89 91
90 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, 92 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext,
91 const base::android::JavaRef<jobject>& jimage); 93 const base::android::JavaRef<jobject>& jimage);
92 94
95 void OnBackgroundColorChanged(unsigned int color);
96 void OnTopControlsChanged(float top_controls_offset,
97 float top_content_offset);
98 void OnBottomControlsChanged(float bottom_controls_offset,
99 float bottom_content_offset);
100 void StartContentIntent(const GURL& content_url, bool is_main_frame);
101
93 ScopedAnchorView AcquireAnchorView(); 102 ScopedAnchorView AcquireAnchorView();
94 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 103 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
95 const gfx::RectF& bounds); 104 const gfx::RectF& bounds);
96 105
97 // This may return null. 106 // This may return null.
98 base::android::ScopedJavaLocalRef<jobject> GetContainerView(); 107 base::android::ScopedJavaLocalRef<jobject> GetContainerView();
99 108
100 protected: 109 protected:
101 ViewAndroid* parent_; 110 ViewAndroid* parent_;
102 111
(...skipping 10 matching lines...) Expand all
113 scoped_refptr<cc::Layer> layer_; 122 scoped_refptr<cc::Layer> layer_;
114 JavaObjectWeakGlobalRef delegate_; 123 JavaObjectWeakGlobalRef delegate_;
115 gfx::Vector2dF content_offset_; // in CSS pixel 124 gfx::Vector2dF content_offset_; // in CSS pixel
116 125
117 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 126 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
118 }; 127 };
119 128
120 } // namespace ui 129 } // namespace ui
121 130
122 #endif // UI_ANDROID_VIEW_ANDROID_H_ 131 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java ('k') | ui/android/view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698