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

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

Issue 2708703004: Reland "Refactor ContentViewClient (4/6)" (Closed)
Patch Set: - Created 3 years, 10 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/android/view_client.h" 13 #include "ui/android/view_client.h"
14 #include "ui/gfx/geometry/rect_f.h" 14 #include "ui/gfx/geometry/rect_f.h"
15 15
16 class GURL;
17
16 namespace cc { 18 namespace cc {
17 class Layer; 19 class Layer;
18 } 20 }
19 21
20 namespace ui { 22 namespace ui {
21 23
22 class WindowAndroid; 24 class WindowAndroid;
23 25
24 // A simple container for a UI layer. 26 // A simple container for a UI layer.
25 // At the root of the hierarchy is a WindowAndroid, when attached. 27 // At the root of the hierarchy is a WindowAndroid, when attached.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 97
96 // Detaches this view from its parent. 98 // Detaches this view from its parent.
97 void RemoveFromParent(); 99 void RemoveFromParent();
98 100
99 // Set the layout relative to parent. Used to do hit testing against events. 101 // Set the layout relative to parent. Used to do hit testing against events.
100 void SetLayout(int x, int y, int width, int height, bool match_parent); 102 void SetLayout(int x, int y, int width, int height, bool match_parent);
101 103
102 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext, 104 bool StartDragAndDrop(const base::android::JavaRef<jstring>& jtext,
103 const base::android::JavaRef<jobject>& jimage); 105 const base::android::JavaRef<jobject>& jimage);
104 106
107 void OnBackgroundColorChanged(unsigned int color);
108 void OnTopControlsChanged(float top_controls_offset,
109 float top_content_offset);
110 void OnBottomControlsChanged(float bottom_controls_offset,
111 float bottom_content_offset);
112 void StartContentIntent(const GURL& content_url, bool is_main_frame);
113
105 ScopedAnchorView AcquireAnchorView(); 114 ScopedAnchorView AcquireAnchorView();
106 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 115 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
107 const gfx::RectF& bounds); 116 const gfx::RectF& bounds);
108 117
109 // This may return null. 118 // This may return null.
110 base::android::ScopedJavaLocalRef<jobject> GetContainerView(); 119 base::android::ScopedJavaLocalRef<jobject> GetContainerView();
111 120
112 protected: 121 protected:
113 // Internal implementation of ViewClient forwarding calls to the interface. 122 // Internal implementation of ViewClient forwarding calls to the interface.
114 bool OnTouchEventInternal(const MotionEventData& event); 123 bool OnTouchEventInternal(const MotionEventData& event);
(...skipping 28 matching lines...) Expand all
143 bool match_parent_; // Bounds matches that of the parent if true. 152 bool match_parent_; // Bounds matches that of the parent if true.
144 153
145 gfx::Vector2dF content_offset_; // In CSS pixel. 154 gfx::Vector2dF content_offset_; // In CSS pixel.
146 155
147 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 156 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
148 }; 157 };
149 158
150 } // namespace ui 159 } // namespace ui
151 160
152 #endif // UI_ANDROID_VIEW_ANDROID_H_ 161 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698