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

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

Issue 2682593002: Refactor ContentViewClient (4/6) (Closed)
Patch Set: shell vad 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,
113 bool is_main_frame);
114
105 ScopedAnchorView AcquireAnchorView(); 115 ScopedAnchorView AcquireAnchorView();
106 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 116 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
107 const gfx::RectF& bounds); 117 const gfx::RectF& bounds);
108 118
109 // This may return null. 119 // This may return null.
110 base::android::ScopedJavaLocalRef<jobject> GetContainerView(); 120 base::android::ScopedJavaLocalRef<jobject> GetContainerView();
111 121
112 protected: 122 protected:
113 // Internal implementation of ViewClient forwarding calls to the interface. 123 // Internal implementation of ViewClient forwarding calls to the interface.
114 bool OnTouchEventInternal(const MotionEventData& event); 124 bool OnTouchEventInternal(const MotionEventData& event);
(...skipping 28 matching lines...) Expand all
143 bool match_parent_; // Bounds matches that of the parent if true. 153 bool match_parent_; // Bounds matches that of the parent if true.
144 154
145 gfx::Vector2dF content_offset_; // In CSS pixel. 155 gfx::Vector2dF content_offset_; // In CSS pixel.
146 156
147 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 157 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
148 }; 158 };
149 159
150 } // namespace ui 160 } // namespace ui
151 161
152 #endif // UI_ANDROID_VIEW_ANDROID_H_ 162 #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