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

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: Fixed android build 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | components/web_contents_delegate_android/color_chooser_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e8a624913a205e1fd741fe36ff02f00c2cf483c6 100644
--- a/components/web_contents_delegate_android/color_chooser_android.h
+++ b/components/web_contents_delegate_android/color_chooser_android.h
@@ -9,18 +9,20 @@
#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 WebContents;
+} // namespace content
+
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 +35,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);
};
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | components/web_contents_delegate_android/color_chooser_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698