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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 9203001: Implement input type=color UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed issues/removed color_select_helper/added color_chooser_id Created 8 years, 10 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: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index cf0ae51b8f6d3d147a548439f2c202ca8008942b..0fd45e33ac7f3ea8dfaf3b55f09d28141efd79fe 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -502,6 +502,10 @@ bool TabContents::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser,
+ OnSetSelectedColorInColorChooser)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -513,6 +517,24 @@ bool TabContents::OnMessageReceived(const IPC::Message& message) {
return handled;
}
+void TabContents::OnOpenColorChooser(unsigned color_chooser_id,
+ const SkColor& color) {
+ delegate_->OpenColorChooser(this, color_chooser_id, color);
+}
+
+void TabContents::OnEndColorChooser(unsigned color_chooser_id) {
+ delegate_->EndColorChooser(this);
+}
+
+void TabContents::OnSetSelectedColorInColorChooser(
+ unsigned color_chooser_id, const SkColor& color) {
+ delegate_->SetSelectedColorInColorChooser(this, color_chooser_id, color);
+}
+
+void TabContents::DidEndColorChooser() {
+ delegate_->DidEndColorChooser(this);
+}
+
void TabContents::RunFileChooser(
RenderViewHost* render_view_host,
const content::FileChooserParams& params) {

Powered by Google App Engine
This is Rietveld 408576698