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 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2525 GetFocusedNode())) | 2525 GetFocusedNode())) |
2526 break; | 2526 break; |
2527 did_execute_command = true; | 2527 did_execute_command = true; |
2528 } | 2528 } |
2529 | 2529 |
2530 return did_execute_command; | 2530 return did_execute_command; |
2531 } | 2531 } |
2532 | 2532 |
2533 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( | 2533 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( |
2534 WebKit::WebColorChooserClient* client, | 2534 WebKit::WebColorChooserClient* client, |
2535 const WebKit::WebColor& initial_color) { | 2535 const WebKit::WebColor& initial_color, |
| 2536 const WebKit::WebVector<WebKit::WebColorSuggestion>& suggestions) { |
2536 RendererWebColorChooserImpl* color_chooser = | 2537 RendererWebColorChooserImpl* color_chooser = |
2537 new RendererWebColorChooserImpl(this, client); | 2538 new RendererWebColorChooserImpl(this, client); |
2538 color_chooser->Open(static_cast<SkColor>(initial_color)); | 2539 std::vector<content::ColorSuggestion> color_suggestions; |
| 2540 for (size_t i = 0; i < suggestions.size(); i++) { |
| 2541 color_suggestions.push_back(content::ColorSuggestion(suggestions[i])); |
| 2542 } |
| 2543 color_chooser->Open(static_cast<SkColor>(initial_color), color_suggestions); |
2539 return color_chooser; | 2544 return color_chooser; |
2540 } | 2545 } |
2541 | 2546 |
2542 bool RenderViewImpl::runFileChooser( | 2547 bool RenderViewImpl::runFileChooser( |
2543 const WebKit::WebFileChooserParams& params, | 2548 const WebKit::WebFileChooserParams& params, |
2544 WebFileChooserCompletion* chooser_completion) { | 2549 WebFileChooserCompletion* chooser_completion) { |
2545 // Do not open the file dialog in a hidden RenderView. | 2550 // Do not open the file dialog in a hidden RenderView. |
2546 if (is_hidden()) | 2551 if (is_hidden()) |
2547 return false; | 2552 return false; |
2548 FileChooserParams ipc_params; | 2553 FileChooserParams ipc_params; |
(...skipping 3956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6505 for (size_t i = 0; i < icon_urls.size(); i++) { | 6510 for (size_t i = 0; i < icon_urls.size(); i++) { |
6506 WebURL url = icon_urls[i].iconURL(); | 6511 WebURL url = icon_urls[i].iconURL(); |
6507 if (!url.isEmpty()) | 6512 if (!url.isEmpty()) |
6508 urls.push_back(FaviconURL(url, | 6513 urls.push_back(FaviconURL(url, |
6509 ToFaviconType(icon_urls[i].iconType()))); | 6514 ToFaviconType(icon_urls[i].iconType()))); |
6510 } | 6515 } |
6511 SendUpdateFaviconURL(urls); | 6516 SendUpdateFaviconURL(urls); |
6512 } | 6517 } |
6513 | 6518 |
6514 } // namespace content | 6519 } // namespace content |
OLD | NEW |