| 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 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2450 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2450 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2451 AppCacheAccessed(manifest_url, blocked_by_policy)); | 2451 AppCacheAccessed(manifest_url, blocked_by_policy)); |
| 2452 } | 2452 } |
| 2453 | 2453 |
| 2454 void WebContentsImpl::OnOpenColorChooser( | 2454 void WebContentsImpl::OnOpenColorChooser( |
| 2455 int color_chooser_id, | 2455 int color_chooser_id, |
| 2456 SkColor color, | 2456 SkColor color, |
| 2457 const std::vector<ColorSuggestion>& suggestions) { | 2457 const std::vector<ColorSuggestion>& suggestions) { |
| 2458 ColorChooser* new_color_chooser = | 2458 ColorChooser* new_color_chooser = |
| 2459 delegate_->OpenColorChooser(this, color, suggestions); | 2459 delegate_->OpenColorChooser(this, color, suggestions); |
| 2460 if (color_chooser_ == new_color_chooser) | 2460 if (!new_color_chooser) |
| 2461 return; | 2461 return; |
| 2462 if (color_chooser_) |
| 2463 color_chooser_->End(); |
| 2462 color_chooser_.reset(new_color_chooser); | 2464 color_chooser_.reset(new_color_chooser); |
| 2463 color_chooser_identifier_ = color_chooser_id; | 2465 color_chooser_identifier_ = color_chooser_id; |
| 2464 } | 2466 } |
| 2465 | 2467 |
| 2466 void WebContentsImpl::OnEndColorChooser(int color_chooser_id) { | 2468 void WebContentsImpl::OnEndColorChooser(int color_chooser_id) { |
| 2467 if (color_chooser_ && | 2469 if (color_chooser_ && |
| 2468 color_chooser_id == color_chooser_identifier_) | 2470 color_chooser_id == color_chooser_identifier_) |
| 2469 color_chooser_->End(); | 2471 color_chooser_->End(); |
| 2470 } | 2472 } |
| 2471 | 2473 |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3853 } | 3855 } |
| 3854 | 3856 |
| 3855 void WebContentsImpl::OnFrameRemoved( | 3857 void WebContentsImpl::OnFrameRemoved( |
| 3856 RenderViewHostImpl* render_view_host, | 3858 RenderViewHostImpl* render_view_host, |
| 3857 int64 frame_id) { | 3859 int64 frame_id) { |
| 3858 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3860 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3859 FrameDetached(render_view_host, frame_id)); | 3861 FrameDetached(render_view_host, frame_id)); |
| 3860 } | 3862 } |
| 3861 | 3863 |
| 3862 } // namespace content | 3864 } // namespace content |
| OLD | NEW |