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

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

Issue 501583003: Move external popup menus from WebViewClient to WebFrameClient, part 3/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_android.h" 10 #include "base/android/jni_android.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/gfx/rect.h" 21 #include "ui/gfx/rect.h"
22 #include "ui/gfx/rect_f.h" 22 #include "ui/gfx/rect_f.h"
23 #include "url/gurl.h" 23 #include "url/gurl.h"
24 24
25 namespace ui { 25 namespace ui {
26 class ViewAndroid; 26 class ViewAndroid;
27 class WindowAndroid; 27 class WindowAndroid;
28 } 28 }
29 29
30 namespace content { 30 namespace content {
31
31 class GinJavaBridgeDispatcherHost; 32 class GinJavaBridgeDispatcherHost;
33 class RenderFrameHost;
32 class RenderWidgetHostViewAndroid; 34 class RenderWidgetHostViewAndroid;
33 struct MenuItem; 35 struct MenuItem;
34 36
35 // TODO(jrg): this is a shell. Upstream the rest. 37 // TODO(jrg): this is a shell. Upstream the rest.
36 class ContentViewCoreImpl : public ContentViewCore, 38 class ContentViewCoreImpl : public ContentViewCore,
37 public WebContentsObserver { 39 public WebContentsObserver {
38 public: 40 public:
39 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); 41 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents);
40 ContentViewCoreImpl(JNIEnv* env, 42 ContentViewCoreImpl(JNIEnv* env,
41 jobject obj, 43 jobject obj,
(...skipping 29 matching lines...) Expand all
71 // Methods called from Java via JNI 73 // Methods called from Java via JNI
72 // -------------------------------------------------------------------------- 74 // --------------------------------------------------------------------------
73 75
74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, 76 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env,
75 jobject obj); 77 jobject obj);
76 78
77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); 79 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj);
78 80
79 // Notifies the ContentViewCore that items were selected in the currently 81 // Notifies the ContentViewCore that items were selected in the currently
80 // showing select popup. 82 // showing select popup.
81 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); 83 void SelectPopupMenuItems(JNIEnv* env, jobject obj,
84 jlong selectPopupSourceFrame,
85 jintArray indices);
82 86
83 void LoadUrl( 87 void LoadUrl(
84 JNIEnv* env, jobject obj, 88 JNIEnv* env, jobject obj,
85 jstring url, 89 jstring url,
86 jint load_url_type, 90 jint load_url_type,
87 jint transition_type, 91 jint transition_type,
88 jstring j_referrer_url, 92 jstring j_referrer_url,
89 jint referrer_policy, 93 jint referrer_policy,
90 jint ua_override_option, 94 jint ua_override_option,
91 jstring extra_headers, 95 jstring extra_headers,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // -------------------------------------------------------------------------- 213 // --------------------------------------------------------------------------
210 214
211 void OnSmartClipDataExtracted(const base::string16& text, 215 void OnSmartClipDataExtracted(const base::string16& text,
212 const base::string16& html, 216 const base::string16& html,
213 const gfx::Rect& clip_rect); 217 const gfx::Rect& clip_rect);
214 218
215 // Creates a popup menu with |items|. 219 // Creates a popup menu with |items|.
216 // |multiple| defines if it should support multi-select. 220 // |multiple| defines if it should support multi-select.
217 // If not |multiple|, |selected_item| sets the initially selected item. 221 // If not |multiple|, |selected_item| sets the initially selected item.
218 // Otherwise, item's "checked" flag selects it. 222 // Otherwise, item's "checked" flag selects it.
219 void ShowSelectPopupMenu(const gfx::Rect& bounds, 223 void ShowSelectPopupMenu(RenderFrameHost* frame,
224 const gfx::Rect& bounds,
220 const std::vector<MenuItem>& items, 225 const std::vector<MenuItem>& items,
221 int selected_item, 226 int selected_item,
222 bool multiple); 227 bool multiple);
223 // Hides a visible popup menu. 228 // Hides a visible popup menu.
224 void HideSelectPopupMenu(); 229 void HideSelectPopupMenu();
225 230
226 // All sizes and offsets are in CSS pixels as cached by the renderer. 231 // All sizes and offsets are in CSS pixels as cached by the renderer.
227 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset, 232 void UpdateFrameInfo(const gfx::Vector2dF& scroll_offset,
228 float page_scale_factor, 233 float page_scale_factor,
229 const gfx::Vector2dF& page_scale_factor_limits, 234 const gfx::Vector2dF& page_scale_factor_limits,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 java_bridge_dispatcher_host_; 370 java_bridge_dispatcher_host_;
366 371
367 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 372 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
368 }; 373 };
369 374
370 bool RegisterContentViewCore(JNIEnv* env); 375 bool RegisterContentViewCore(JNIEnv* env);
371 376
372 } // namespace content 377 } // namespace content
373 378
374 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 379 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698