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 2522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2533 GetFocusedNode())) | 2533 GetFocusedNode())) |
2534 break; | 2534 break; |
2535 did_execute_command = true; | 2535 did_execute_command = true; |
2536 } | 2536 } |
2537 | 2537 |
2538 return did_execute_command; | 2538 return did_execute_command; |
2539 } | 2539 } |
2540 | 2540 |
2541 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( | 2541 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( |
2542 WebKit::WebColorChooserClient* client, | 2542 WebKit::WebColorChooserClient* client, |
2543 const WebKit::WebColor& initial_color) { | 2543 const WebKit::WebColor& initial_color, |
| 2544 const WebKit::WebVector<WebKit::WebColorSuggestion>& suggestions) { |
2544 RendererWebColorChooserImpl* color_chooser = | 2545 RendererWebColorChooserImpl* color_chooser = |
2545 new RendererWebColorChooserImpl(this, client); | 2546 new RendererWebColorChooserImpl(this, client); |
2546 color_chooser->Open(static_cast<SkColor>(initial_color)); | 2547 std::vector<content::ColorSuggestion> color_suggestions; |
| 2548 for (size_t i = 0; i < suggestions.size(); i++) { |
| 2549 color_suggestions.push_back(content::ColorSuggestion(suggestions[i])); |
| 2550 } |
| 2551 color_chooser->Open(static_cast<SkColor>(initial_color), color_suggestions); |
2547 return color_chooser; | 2552 return color_chooser; |
2548 } | 2553 } |
2549 | 2554 |
2550 bool RenderViewImpl::runFileChooser( | 2555 bool RenderViewImpl::runFileChooser( |
2551 const WebKit::WebFileChooserParams& params, | 2556 const WebKit::WebFileChooserParams& params, |
2552 WebFileChooserCompletion* chooser_completion) { | 2557 WebFileChooserCompletion* chooser_completion) { |
2553 // Do not open the file dialog in a hidden RenderView. | 2558 // Do not open the file dialog in a hidden RenderView. |
2554 if (is_hidden()) | 2559 if (is_hidden()) |
2555 return false; | 2560 return false; |
2556 FileChooserParams ipc_params; | 2561 FileChooserParams ipc_params; |
(...skipping 3974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6531 for (size_t i = 0; i < icon_urls.size(); i++) { | 6536 for (size_t i = 0; i < icon_urls.size(); i++) { |
6532 WebURL url = icon_urls[i].iconURL(); | 6537 WebURL url = icon_urls[i].iconURL(); |
6533 if (!url.isEmpty()) | 6538 if (!url.isEmpty()) |
6534 urls.push_back(FaviconURL(url, | 6539 urls.push_back(FaviconURL(url, |
6535 ToFaviconType(icon_urls[i].iconType()))); | 6540 ToFaviconType(icon_urls[i].iconType()))); |
6536 } | 6541 } |
6537 SendUpdateFaviconURL(urls); | 6542 SendUpdateFaviconURL(urls); |
6538 } | 6543 } |
6539 | 6544 |
6540 } // namespace content | 6545 } // namespace content |
OLD | NEW |