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 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2322 PluginCrashed(plugin_path, plugin_pid)); | 2322 PluginCrashed(plugin_path, plugin_pid)); |
2323 } | 2323 } |
2324 | 2324 |
2325 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, | 2325 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, |
2326 bool blocked_by_policy) { | 2326 bool blocked_by_policy) { |
2327 // Notify observers about navigation. | 2327 // Notify observers about navigation. |
2328 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2328 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2329 AppCacheAccessed(manifest_url, blocked_by_policy)); | 2329 AppCacheAccessed(manifest_url, blocked_by_policy)); |
2330 } | 2330 } |
2331 | 2331 |
2332 void WebContentsImpl::OnOpenColorChooser(int color_chooser_id, | 2332 void WebContentsImpl::OnOpenColorChooser( |
2333 SkColor color) { | 2333 int color_chooser_id, |
2334 ColorChooser* new_color_chooser = delegate_->OpenColorChooser(this, color); | 2334 SkColor color, |
| 2335 const std::vector<ColorSuggestion>& suggestions) { |
| 2336 ColorChooser* new_color_chooser = |
| 2337 delegate_->OpenColorChooser(this, color, suggestions); |
2335 if (color_chooser_ == new_color_chooser) | 2338 if (color_chooser_ == new_color_chooser) |
2336 return; | 2339 return; |
2337 color_chooser_.reset(new_color_chooser); | 2340 color_chooser_.reset(new_color_chooser); |
2338 color_chooser_identifier_ = color_chooser_id; | 2341 color_chooser_identifier_ = color_chooser_id; |
2339 } | 2342 } |
2340 | 2343 |
2341 void WebContentsImpl::OnEndColorChooser(int color_chooser_id) { | 2344 void WebContentsImpl::OnEndColorChooser(int color_chooser_id) { |
2342 if (color_chooser_ && | 2345 if (color_chooser_ && |
2343 color_chooser_id == color_chooser_identifier_) | 2346 color_chooser_id == color_chooser_identifier_) |
2344 color_chooser_->End(); | 2347 color_chooser_->End(); |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3663 } | 3666 } |
3664 | 3667 |
3665 void WebContentsImpl::OnFrameRemoved( | 3668 void WebContentsImpl::OnFrameRemoved( |
3666 RenderViewHostImpl* render_view_host, | 3669 RenderViewHostImpl* render_view_host, |
3667 int64 frame_id) { | 3670 int64 frame_id) { |
3668 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3671 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3669 FrameDetached(render_view_host, frame_id)); | 3672 FrameDetached(render_view_host, frame_id)); |
3670 } | 3673 } |
3671 | 3674 |
3672 } // namespace content | 3675 } // namespace content |
OLD | NEW |