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

Unified Diff: components/web_contents_delegate_android/color_chooser_android.h

Issue 13150004: Support color chooser inside extesions, apps, chrome frame, dev tool (Closed) Base URL: http://git.chromium.org/chromium/src.git@ngcolor
Patch Set: Rebased Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/web_contents_delegate_android/color_chooser_android.h
diff --git a/components/web_contents_delegate_android/color_chooser_android.h b/components/web_contents_delegate_android/color_chooser_android.h
index 7b9cc1ac8231385f3961608c8e048ff1391710aa..ae44cd8c449e18552e5c11720e6e89c239a2fb71 100644
--- a/components/web_contents_delegate_android/color_chooser_android.h
+++ b/components/web_contents_delegate_android/color_chooser_android.h
@@ -9,7 +9,6 @@
#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;
@@ -17,10 +16,9 @@ using base::android::ScopedJavaLocalRef;
namespace components {
// Glues the Java (ColorPickerChooser.java) picker with the native part.
-class ColorChooserAndroid : public content::ColorChooser,
- public content::WebContentsObserver {
+class ColorChooserAndroid : public content::ColorChooser {
public:
- ColorChooserAndroid(int identifier, content::WebContents* tab,
+ ColorChooserAndroid(content::WebContents* tab,
SkColor initial_color);
virtual ~ColorChooserAndroid();
@@ -33,6 +31,10 @@ class ColorChooserAndroid : public content::ColorChooser,
private:
base::android::ScopedJavaGlobalRef<jobject> j_color_chooser_;
+ // The web contents invoking the color chooser. No ownership. because it will
+ // outlive this class.
+ content::WebContents* web_contents_;
+
DISALLOW_COPY_AND_ASSIGN(ColorChooserAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698