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 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2523 GetFocusedNode())) | 2523 GetFocusedNode())) |
2524 break; | 2524 break; |
2525 did_execute_command = true; | 2525 did_execute_command = true; |
2526 } | 2526 } |
2527 | 2527 |
2528 return did_execute_command; | 2528 return did_execute_command; |
2529 } | 2529 } |
2530 | 2530 |
2531 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( | 2531 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( |
2532 WebKit::WebColorChooserClient* client, | 2532 WebKit::WebColorChooserClient* client, |
2533 const WebKit::WebColor& initial_color) { | 2533 const WebKit::WebColor& initial_color, |
2534 const WebKit::WebVector<WebKit::WebColor>& suggestions, | |
2535 const WebKit::WebVector<WebKit::WebString>& suggestionLabels) { | |
Miguel Garcia
2013/08/19 14:43:27
suggestion_labels
| |
2534 RendererWebColorChooserImpl* color_chooser = | 2536 RendererWebColorChooserImpl* color_chooser = |
2535 new RendererWebColorChooserImpl(this, client); | 2537 new RendererWebColorChooserImpl(this, client); |
2536 color_chooser->Open(static_cast<SkColor>(initial_color)); | 2538 std::vector<SkColor> suggestionColors; |
newt (away)
2013/08/19 23:18:19
be consistent with variable naming. You could use
keishi
2013/08/26 05:28:54
Done.
| |
2539 std::vector<string16> suggestion_label_strings; | |
2540 for (size_t i = 0; i < suggestions.size(); i++) { | |
2541 suggestionColors.push_back(static_cast<SkColor>(suggestions[i])); | |
2542 suggestion_label_strings.push_back(suggestionLabels[i]); | |
2543 } | |
2544 color_chooser->Open(static_cast<SkColor>(initial_color), | |
2545 suggestionColors, | |
Miguel Garcia
2013/08/19 14:43:27
suggestion_colors
| |
2546 suggestion_label_strings); | |
2537 return color_chooser; | 2547 return color_chooser; |
2538 } | 2548 } |
2539 | 2549 |
2540 bool RenderViewImpl::runFileChooser( | 2550 bool RenderViewImpl::runFileChooser( |
2541 const WebKit::WebFileChooserParams& params, | 2551 const WebKit::WebFileChooserParams& params, |
2542 WebFileChooserCompletion* chooser_completion) { | 2552 WebFileChooserCompletion* chooser_completion) { |
2543 // Do not open the file dialog in a hidden RenderView. | 2553 // Do not open the file dialog in a hidden RenderView. |
2544 if (is_hidden()) | 2554 if (is_hidden()) |
2545 return false; | 2555 return false; |
2546 FileChooserParams ipc_params; | 2556 FileChooserParams ipc_params; |
(...skipping 4019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6566 WebURL url = icon_urls[i].iconURL(); | 6576 WebURL url = icon_urls[i].iconURL(); |
6567 if (!url.isEmpty()) | 6577 if (!url.isEmpty()) |
6568 urls.push_back(FaviconURL(url, | 6578 urls.push_back(FaviconURL(url, |
6569 ToFaviconType(icon_urls[i].iconType()))); | 6579 ToFaviconType(icon_urls[i].iconType()))); |
6570 } | 6580 } |
6571 SendUpdateFaviconURL(urls); | 6581 SendUpdateFaviconURL(urls); |
6572 } | 6582 } |
6573 | 6583 |
6574 | 6584 |
6575 } // namespace content | 6585 } // namespace content |
OLD | NEW |