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

Side by Side Diff: content/renderer/render_view_impl.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 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "content/renderer/mhtml_generator.h" 69 #include "content/renderer/mhtml_generator.h"
70 #include "content/renderer/mouse_lock_dispatcher.h" 70 #include "content/renderer/mouse_lock_dispatcher.h"
71 #include "content/renderer/notification_provider.h" 71 #include "content/renderer/notification_provider.h"
72 #include "content/renderer/p2p/socket_dispatcher.h" 72 #include "content/renderer/p2p/socket_dispatcher.h"
73 #include "content/renderer/plugin_channel_host.h" 73 #include "content/renderer/plugin_channel_host.h"
74 #include "content/renderer/render_process.h" 74 #include "content/renderer/render_process.h"
75 #include "content/renderer/render_thread_impl.h" 75 #include "content/renderer/render_thread_impl.h"
76 #include "content/renderer/render_widget_fullscreen_pepper.h" 76 #include "content/renderer/render_widget_fullscreen_pepper.h"
77 #include "content/renderer/renderer_accessibility.h" 77 #include "content/renderer/renderer_accessibility.h"
78 #include "content/renderer/renderer_webapplicationcachehost_impl.h" 78 #include "content/renderer/renderer_webapplicationcachehost_impl.h"
79 #include "content/renderer/renderer_webcolorchooser_impl.h"
79 #include "content/renderer/renderer_webstoragenamespace_impl.h" 80 #include "content/renderer/renderer_webstoragenamespace_impl.h"
80 #include "content/renderer/speech_input_dispatcher.h" 81 #include "content/renderer/speech_input_dispatcher.h"
81 #include "content/renderer/text_input_client_observer.h" 82 #include "content/renderer/text_input_client_observer.h"
82 #include "content/renderer/v8_value_converter_impl.h" 83 #include "content/renderer/v8_value_converter_impl.h"
83 #include "content/renderer/web_ui_bindings.h" 84 #include "content/renderer/web_ui_bindings.h"
84 #include "content/renderer/webplugin_delegate_proxy.h" 85 #include "content/renderer/webplugin_delegate_proxy.h"
85 #include "content/renderer/websharedworker_proxy.h" 86 #include "content/renderer/websharedworker_proxy.h"
86 #include "media/base/filter_collection.h" 87 #include "media/base/filter_collection.h"
87 #include "media/base/media_switches.h" 88 #include "media/base/media_switches.h"
88 #include "media/base/message_loop_factory_impl.h" 89 #include "media/base/message_loop_factory_impl.h"
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 // seems safest to not execute the rest. 1649 // seems safest to not execute the rest.
1649 if (!frame->executeCommand(WebString::fromUTF8(it->name), 1650 if (!frame->executeCommand(WebString::fromUTF8(it->name),
1650 WebString::fromUTF8(it->value))) 1651 WebString::fromUTF8(it->value)))
1651 break; 1652 break;
1652 did_execute_command = true; 1653 did_execute_command = true;
1653 } 1654 }
1654 1655
1655 return did_execute_command; 1656 return did_execute_command;
1656 } 1657 }
1657 1658
1659 WebKit::WebColorChooser* RenderViewImpl::createColorChooser(
1660 WebKit::WebColorChooserClient* client,
1661 const WebKit::WebColor& initial_color) {
1662 printf("RenderViewImpl::createColorChooser %p\n", this);
1663 RendererWebColorChooserImpl* color_chooser =
1664 new RendererWebColorChooserImpl(this, client);
1665 color_chooser->Open(static_cast<SkColor>(initial_color));
1666 return color_chooser;
1667 }
1668
1658 bool RenderViewImpl::runFileChooser( 1669 bool RenderViewImpl::runFileChooser(
1659 const WebKit::WebFileChooserParams& params, 1670 const WebKit::WebFileChooserParams& params,
1660 WebFileChooserCompletion* chooser_completion) { 1671 WebFileChooserCompletion* chooser_completion) {
1661 // Do not open the file dialog in a hidden RenderView. 1672 // Do not open the file dialog in a hidden RenderView.
1662 if (is_hidden()) 1673 if (is_hidden())
1663 return false; 1674 return false;
1664 content::FileChooserParams ipc_params; 1675 content::FileChooserParams ipc_params;
1665 if (params.directory) 1676 if (params.directory)
1666 ipc_params.mode = content::FileChooserParams::OpenFolder; 1677 ipc_params.mode = content::FileChooserParams::OpenFolder;
1667 else if (params.multiSelect) 1678 else if (params.multiSelect)
(...skipping 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4975 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 4986 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
4976 return !!RenderThreadImpl::current()->compositor_thread(); 4987 return !!RenderThreadImpl::current()->compositor_thread();
4977 } 4988 }
4978 4989
4979 void RenderViewImpl::OnJavaBridgeInit() { 4990 void RenderViewImpl::OnJavaBridgeInit() {
4980 DCHECK(!java_bridge_dispatcher_.get()); 4991 DCHECK(!java_bridge_dispatcher_.get());
4981 #if defined(ENABLE_JAVA_BRIDGE) 4992 #if defined(ENABLE_JAVA_BRIDGE)
4982 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 4993 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
4983 #endif 4994 #endif
4984 } 4995 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698