OLD | NEW |
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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2643 if (!frame->executeCommand(WebString::fromUTF8(it->name), | 2643 if (!frame->executeCommand(WebString::fromUTF8(it->name), |
2644 WebString::fromUTF8(it->value), | 2644 WebString::fromUTF8(it->value), |
2645 GetFocusedNode())) | 2645 GetFocusedNode())) |
2646 break; | 2646 break; |
2647 did_execute_command = true; | 2647 did_execute_command = true; |
2648 } | 2648 } |
2649 | 2649 |
2650 return did_execute_command; | 2650 return did_execute_command; |
2651 } | 2651 } |
2652 | 2652 |
2653 blink::WebColorChooser* RenderViewImpl::createColorChooser( | 2653 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( |
2654 blink::WebColorChooserClient* client, | 2654 blink::WebColorChooserClient* client, |
2655 const blink::WebColor& initial_color) { | 2655 const blink::WebColor& initial_color, |
| 2656 const blink::WebVector<blink::WebColorSuggestion>& suggestions) { |
2656 RendererWebColorChooserImpl* color_chooser = | 2657 RendererWebColorChooserImpl* color_chooser = |
2657 new RendererWebColorChooserImpl(this, client); | 2658 new RendererWebColorChooserImpl(this, client); |
2658 color_chooser->Open(static_cast<SkColor>(initial_color)); | 2659 std::vector<content::ColorSuggestion> color_suggestions; |
| 2660 for (size_t i = 0; i < suggestions.size(); i++) { |
| 2661 color_suggestions.push_back(content::ColorSuggestion(suggestions[i])); |
| 2662 } |
| 2663 color_chooser->Open(static_cast<SkColor>(initial_color), color_suggestions); |
2659 return color_chooser; | 2664 return color_chooser; |
2660 } | 2665 } |
2661 | 2666 |
2662 bool RenderViewImpl::runFileChooser( | 2667 bool RenderViewImpl::runFileChooser( |
2663 const blink::WebFileChooserParams& params, | 2668 const blink::WebFileChooserParams& params, |
2664 WebFileChooserCompletion* chooser_completion) { | 2669 WebFileChooserCompletion* chooser_completion) { |
2665 // Do not open the file dialog in a hidden RenderView. | 2670 // Do not open the file dialog in a hidden RenderView. |
2666 if (is_hidden()) | 2671 if (is_hidden()) |
2667 return false; | 2672 return false; |
2668 FileChooserParams ipc_params; | 2673 FileChooserParams ipc_params; |
(...skipping 3992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6661 for (size_t i = 0; i < icon_urls.size(); i++) { | 6666 for (size_t i = 0; i < icon_urls.size(); i++) { |
6662 WebURL url = icon_urls[i].iconURL(); | 6667 WebURL url = icon_urls[i].iconURL(); |
6663 if (!url.isEmpty()) | 6668 if (!url.isEmpty()) |
6664 urls.push_back(FaviconURL(url, | 6669 urls.push_back(FaviconURL(url, |
6665 ToFaviconType(icon_urls[i].iconType()))); | 6670 ToFaviconType(icon_urls[i].iconType()))); |
6666 } | 6671 } |
6667 SendUpdateFaviconURL(urls); | 6672 SendUpdateFaviconURL(urls); |
6668 } | 6673 } |
6669 | 6674 |
6670 } // namespace content | 6675 } // namespace content |
OLD | NEW |