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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 PluginCrashed(plugin_path, plugin_pid)); | 2521 PluginCrashed(plugin_path, plugin_pid)); |
2522 } | 2522 } |
2523 | 2523 |
2524 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, | 2524 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, |
2525 bool blocked_by_policy) { | 2525 bool blocked_by_policy) { |
2526 // Notify observers about navigation. | 2526 // Notify observers about navigation. |
2527 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2527 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2528 AppCacheAccessed(manifest_url, blocked_by_policy)); | 2528 AppCacheAccessed(manifest_url, blocked_by_policy)); |
2529 } | 2529 } |
2530 | 2530 |
2531 void WebContentsImpl::OnOpenColorChooser(int color_chooser_id, | 2531 void WebContentsImpl::OnOpenColorChooser( |
2532 SkColor color) { | 2532 int color_chooser_id, |
2533 ColorChooser* new_color_chooser = delegate_->OpenColorChooser(this, color); | 2533 SkColor color, |
| 2534 const std::vector<ColorSuggestion>& suggestions) { |
| 2535 ColorChooser* new_color_chooser = |
| 2536 delegate_->OpenColorChooser(this, color, suggestions); |
2534 if (color_chooser_ == new_color_chooser) | 2537 if (color_chooser_ == new_color_chooser) |
2535 return; | 2538 return; |
2536 color_chooser_.reset(new_color_chooser); | 2539 color_chooser_.reset(new_color_chooser); |
2537 color_chooser_identifier_ = color_chooser_id; | 2540 color_chooser_identifier_ = color_chooser_id; |
2538 } | 2541 } |
2539 | 2542 |
2540 void WebContentsImpl::OnEndColorChooser(int color_chooser_id) { | 2543 void WebContentsImpl::OnEndColorChooser(int color_chooser_id) { |
2541 if (color_chooser_ && | 2544 if (color_chooser_ && |
2542 color_chooser_id == color_chooser_identifier_) | 2545 color_chooser_id == color_chooser_identifier_) |
2543 color_chooser_->End(); | 2546 color_chooser_->End(); |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3859 gfx::Size WebContentsImpl::GetSizeForNewRenderView() const { | 3862 gfx::Size WebContentsImpl::GetSizeForNewRenderView() const { |
3860 gfx::Size size; | 3863 gfx::Size size; |
3861 if (delegate_) | 3864 if (delegate_) |
3862 size = delegate_->GetSizeForNewRenderView(this); | 3865 size = delegate_->GetSizeForNewRenderView(this); |
3863 if (size.IsEmpty()) | 3866 if (size.IsEmpty()) |
3864 size = view_->GetContainerSize(); | 3867 size = view_->GetContainerSize(); |
3865 return size; | 3868 return size; |
3866 } | 3869 } |
3867 | 3870 |
3868 } // namespace content | 3871 } // namespace content |
OLD | NEW |