Index: content/components/web_contents_delegate_android/color_chooser_android.h |
diff --git a/content/components/web_contents_delegate_android/color_chooser_android.h b/content/components/web_contents_delegate_android/color_chooser_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..304979c2b9ab2b3b72ff3bf2c37279beaa069837 |
--- /dev/null |
+++ b/content/components/web_contents_delegate_android/color_chooser_android.h |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_COLOR_CHOOSER_ANDROID_H_ |
+#define CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_COLOR_CHOOSER_ANDROID_H_ |
Peter Beverloo
2012/11/23 17:55:48
These should be CONTENT_COMPONENTS_WEB_CONTENTS_DE
Miguel Garcia
2012/11/26 11:35:10
Done.
|
+ |
+#include "base/android/jni_android.h" |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "content/public/browser/color_chooser.h" |
+#include "content/public/browser/web_contents_observer.h" |
+ |
+using base::android::AttachCurrentThread; |
+using base::android::ScopedJavaLocalRef; |
+ |
+namespace content { |
+ |
+class ColorChooserAndroid : public content::ColorChooser, |
+ public content::WebContentsObserver { |
+ |
+ public: |
+ ColorChooserAndroid(int identifier, content::WebContents* tab, |
+ SkColor initial_color); |
+ virtual ~ColorChooserAndroid(); |
+ |
+ // ColorChooser interface |
+ virtual void End() OVERRIDE; |
+ virtual void SetSelectedColor(SkColor color) OVERRIDE; |
+ |
+ void OnColorChosen(JNIEnv* env, jobject obj, jint color); |
+ private: |
Peter Beverloo
2012/11/23 17:55:48
nit: empty line above private:.
Miguel Garcia
2012/11/26 11:35:10
Done.
|
+ base::android::ScopedJavaGlobalRef<jobject> j_color_chooser_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ColorChooserAndroid); |
+}; |
+ |
+// Native JNI methods |
+ |
+ bool RegisterColorChooserAndroid(JNIEnv* env); |
Peter Beverloo
2012/11/23 17:55:48
nit: no indenting here.
Miguel Garcia
2012/11/26 11:35:10
Done.
|
+} |
+ |
+#endif // CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_COLOR_CHOOSER_ANDROID_H_ |