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

Side by Side Diff: content/components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 11316153: implement input type=color for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/components/web_contents_delegate_android/web_contents_delegate _android.h" 5 #include "content/components/web_contents_delegate_android/web_contents_delegate _android.h"
6 6
7 #include <android/keycodes.h> 7 #include <android/keycodes.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "content/components/web_contents_delegate_android/color_chooser_android .h"
11 #include "content/public/browser/android/content_view_core.h" 12 #include "content/public/browser/android/content_view_core.h"
12 #include "content/public/browser/render_widget_host_view.h" 13 #include "content/public/browser/render_widget_host_view.h"
13 #include "content/public/browser/invalidate_type.h" 14 #include "content/public/browser/invalidate_type.h"
14 #include "content/public/browser/page_navigator.h" 15 #include "content/public/browser/page_navigator.h"
15 #include "content/public/browser/navigation_controller.h" 16 #include "content/public/browser/navigation_controller.h"
16 #include "content/public/browser/navigation_entry.h" 17 #include "content/public/browser/navigation_entry.h"
17 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
18 #include "content/public/common/page_transition_types.h" 19 #include "content/public/common/page_transition_types.h"
19 #include "content/public/common/referrer.h" 20 #include "content/public/common/referrer.h"
20 #include "jni/WebContentsDelegateAndroid_jni.h" 21 #include "jni/WebContentsDelegateAndroid_jni.h"
(...skipping 17 matching lines...) Expand all
38 39
39 ScopedJavaLocalRef<jobject> 40 ScopedJavaLocalRef<jobject>
40 WebContentsDelegateAndroid::GetJavaDelegate(JNIEnv* env) const { 41 WebContentsDelegateAndroid::GetJavaDelegate(JNIEnv* env) const {
41 return weak_java_delegate_.get(env); 42 return weak_java_delegate_.get(env);
42 } 43 }
43 44
44 // ---------------------------------------------------------------------------- 45 // ----------------------------------------------------------------------------
45 // WebContentsDelegate methods 46 // WebContentsDelegate methods
46 // ---------------------------------------------------------------------------- 47 // ----------------------------------------------------------------------------
47 48
49 ColorChooser* WebContentsDelegateAndroid::OpenColorChooser(
50 WebContents* web_contents,
51 int color_chooser_id,
52 SkColor color) {
53 return ColorChooser::Create(color_chooser_id, web_contents, color);
54 }
55
56
Peter Beverloo 2012/11/23 17:55:48 nit: only a single blank line.
Miguel Garcia 2012/11/26 11:35:10 Done.
48 // OpenURLFromTab() will be called when we're performing a browser-intiated 57 // OpenURLFromTab() will be called when we're performing a browser-intiated
49 // navigation. The most common scenario for this is opening new tabs (see 58 // navigation. The most common scenario for this is opening new tabs (see
50 // RenderViewImpl::decidePolicyForNavigation for more details). 59 // RenderViewImpl::decidePolicyForNavigation for more details).
51 WebContents* WebContentsDelegateAndroid::OpenURLFromTab( 60 WebContents* WebContentsDelegateAndroid::OpenURLFromTab(
52 WebContents* source, 61 WebContents* source,
53 const OpenURLParams& params) { 62 const OpenURLParams& params) {
54 const GURL& url = params.url; 63 const GURL& url = params.url;
55 WindowOpenDisposition disposition = params.disposition; 64 WindowOpenDisposition disposition = params.disposition;
56 PageTransition transition( 65 PageTransition transition(
57 PageTransitionFromInt(params.transition)); 66 PageTransitionFromInt(params.transition));
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 317
309 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { 318 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) {
310 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) { 319 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) {
311 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!"; 320 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!";
312 return false; 321 return false;
313 } 322 }
314 return RegisterNativesImpl(env); 323 return RegisterNativesImpl(env);
315 } 324 }
316 325
317 } // namespace content 326 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698