| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/location.h" |
| 11 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 13 #include "cc/output/copy_output_request.h" | 16 #include "cc/output/copy_output_request.h" |
| 14 #include "cc/output/copy_output_result.h" | 17 #include "cc/output/copy_output_result.h" |
| 15 #include "cc/surfaces/surface.h" | 18 #include "cc/surfaces/surface.h" |
| 16 #include "cc/surfaces/surface_factory.h" | 19 #include "cc/surfaces/surface_factory.h" |
| 17 #include "cc/surfaces/surface_manager.h" | 20 #include "cc/surfaces/surface_manager.h" |
| 18 #include "cc/surfaces/surface_sequence.h" | 21 #include "cc/surfaces/surface_sequence.h" |
| 19 #include "content/browser/accessibility/browser_accessibility_manager.h" | 22 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 20 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 23 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 21 #include "content/browser/compositor/surface_utils.h" | 24 #include "content/browser/compositor/surface_utils.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 SetCrossProcessFrameConnector(nullptr); | 285 SetCrossProcessFrameConnector(nullptr); |
| 283 } | 286 } |
| 284 | 287 |
| 285 // We notify our observers about shutdown here since we are about to release | 288 // We notify our observers about shutdown here since we are about to release |
| 286 // host_ and do not want any event calls coming from | 289 // host_ and do not want any event calls coming from |
| 287 // RenderWidgetHostInputEventRouter afterwards. | 290 // RenderWidgetHostInputEventRouter afterwards. |
| 288 NotifyObserversAboutShutdown(); | 291 NotifyObserversAboutShutdown(); |
| 289 | 292 |
| 290 host_->SetView(nullptr); | 293 host_->SetView(nullptr); |
| 291 host_ = nullptr; | 294 host_ = nullptr; |
| 292 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 295 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
| 293 } | 296 } |
| 294 | 297 |
| 295 void RenderWidgetHostViewChildFrame::SetTooltipText( | 298 void RenderWidgetHostViewChildFrame::SetTooltipText( |
| 296 const base::string16& tooltip_text) { | 299 const base::string16& tooltip_text) { |
| 297 frame_connector_->GetRootRenderWidgetHostView()->SetTooltipText(tooltip_text); | 300 frame_connector_->GetRootRenderWidgetHostView()->SetTooltipText(tooltip_text); |
| 298 } | 301 } |
| 299 | 302 |
| 300 void RenderWidgetHostViewChildFrame::SelectionChanged( | 303 void RenderWidgetHostViewChildFrame::SelectionChanged( |
| 301 const base::string16& text, | 304 const base::string16& text, |
| 302 size_t offset, | 305 size_t offset, |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 | 689 |
| 687 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 690 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 688 return true; | 691 return true; |
| 689 } | 692 } |
| 690 | 693 |
| 691 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 694 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 692 return surface_id_; | 695 return surface_id_; |
| 693 }; | 696 }; |
| 694 | 697 |
| 695 } // namespace content | 698 } // namespace content |
| OLD | NEW |