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

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

Issue 2682593002: 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/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,
101 bool is_main_frame);
102
93 ScopedAnchorView AcquireAnchorView(); 103 ScopedAnchorView AcquireAnchorView();
94 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor, 104 void SetAnchorRect(const base::android::JavaRef<jobject>& anchor,
95 const gfx::RectF& bounds); 105 const gfx::RectF& bounds);
96 106
97 // This may return null. 107 // This may return null.
98 base::android::ScopedJavaLocalRef<jobject> GetContainerView(); 108 base::android::ScopedJavaLocalRef<jobject> GetContainerView();
99 109
100 protected: 110 protected:
101 ViewAndroid* parent_; 111 ViewAndroid* parent_;
102 112
(...skipping 10 matching lines...) Expand all
113 scoped_refptr<cc::Layer> layer_; 123 scoped_refptr<cc::Layer> layer_;
114 JavaObjectWeakGlobalRef delegate_; 124 JavaObjectWeakGlobalRef delegate_;
115 gfx::Vector2dF content_offset_; // in CSS pixel 125 gfx::Vector2dF content_offset_; // in CSS pixel
116 126
117 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); 127 DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
118 }; 128 };
119 129
120 } // namespace ui 130 } // namespace ui
121 131
122 #endif // UI_ANDROID_VIEW_ANDROID_H_ 132 #endif // UI_ANDROID_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698