| 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/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 virtual_keyboard_requested_(false), | 447 virtual_keyboard_requested_(false), |
| 448 #endif | 448 #endif |
| 449 has_snapped_to_boundary_(false), | 449 has_snapped_to_boundary_(false), |
| 450 is_guest_view_hack_(is_guest_view_hack), | 450 is_guest_view_hack_(is_guest_view_hack), |
| 451 set_focus_on_mouse_down_or_key_event_(false), | 451 set_focus_on_mouse_down_or_key_event_(false), |
| 452 device_scale_factor_(0.0f), | 452 device_scale_factor_(0.0f), |
| 453 disable_input_event_router_for_testing_(false), | 453 disable_input_event_router_for_testing_(false), |
| 454 last_active_widget_process_id_(ChildProcessHost::kInvalidUniqueID), | 454 last_active_widget_process_id_(ChildProcessHost::kInvalidUniqueID), |
| 455 last_active_widget_routing_id_(MSG_ROUTING_NONE), | 455 last_active_widget_routing_id_(MSG_ROUTING_NONE), |
| 456 weak_ptr_factory_(this) { | 456 weak_ptr_factory_(this) { |
| 457 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | |
| 458 delegated_frame_host_ = base::MakeUnique<DelegatedFrameHost>( | 457 delegated_frame_host_ = base::MakeUnique<DelegatedFrameHost>( |
| 459 factory->GetContextFactory()->AllocateFrameSinkId(), this); | 458 cc::FrameSinkId( |
| 459 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), |
| 460 base::checked_cast<uint32_t>(host_->GetRoutingID())), |
| 461 this); |
| 460 | 462 |
| 461 if (!is_guest_view_hack_) | 463 if (!is_guest_view_hack_) |
| 462 host_->SetView(this); | 464 host_->SetView(this); |
| 463 | 465 |
| 464 // Let the page-level input event router know about our surface ID | 466 // Let the page-level input event router know about our surface ID |
| 465 // namespace for surface-based hit testing. | 467 // namespace for surface-based hit testing. |
| 466 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) { | 468 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) { |
| 467 host_->delegate()->GetInputEventRouter()->AddFrameSinkIdOwner( | 469 host_->delegate()->GetInputEventRouter()->AddFrameSinkIdOwner( |
| 468 GetFrameSinkId(), this); | 470 GetFrameSinkId(), this); |
| 469 } | 471 } |
| (...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3045 ->GetTextSelection(focused_view) | 3047 ->GetTextSelection(focused_view) |
| 3046 ->GetSelectedText(&selected_text)) { | 3048 ->GetSelectedText(&selected_text)) { |
| 3047 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. | 3049 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. |
| 3048 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); | 3050 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); |
| 3049 clipboard_writer.WriteText(selected_text); | 3051 clipboard_writer.WriteText(selected_text); |
| 3050 } | 3052 } |
| 3051 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) | 3053 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) |
| 3052 } | 3054 } |
| 3053 | 3055 |
| 3054 } // namespace content | 3056 } // namespace content |
| OLD | NEW |