Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2385193002: FrameSinkIds use to WindowIds in window server, Process ID/Route ID in renderer (Closed)
Patch Set: Added missing serialization Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // GuestViews have two RenderWidgetHostViews and so we need to make sure
458 // we don't have FrameSinkId collisions.
457 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 459 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
458 delegated_frame_host_ = base::MakeUnique<DelegatedFrameHost>( 460 cc::FrameSinkId frame_sink_id =
459 factory->GetContextFactory()->AllocateFrameSinkId(), this); 461 is_guest_view_hack_
462 ? factory->GetContextFactory()->AllocateFrameSinkId()
463 : cc::FrameSinkId(
464 base::checked_cast<uint32_t>(host_->GetProcess()->GetID()),
465 base::checked_cast<uint32_t>(host_->GetRoutingID()));
466 delegated_frame_host_ =
467 base::MakeUnique<DelegatedFrameHost>(frame_sink_id, this);
460 468
461 if (!is_guest_view_hack_) 469 if (!is_guest_view_hack_)
462 host_->SetView(this); 470 host_->SetView(this);
463 471
464 // Let the page-level input event router know about our surface ID 472 // Let the page-level input event router know about our surface ID
465 // namespace for surface-based hit testing. 473 // namespace for surface-based hit testing.
466 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) { 474 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) {
467 host_->delegate()->GetInputEventRouter()->AddFrameSinkIdOwner( 475 host_->delegate()->GetInputEventRouter()->AddFrameSinkIdOwner(
468 GetFrameSinkId(), this); 476 GetFrameSinkId(), this);
469 } 477 }
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 ->GetTextSelection(focused_view) 3053 ->GetTextSelection(focused_view)
3046 ->GetSelectedText(&selected_text)) { 3054 ->GetSelectedText(&selected_text)) {
3047 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. 3055 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
3048 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); 3056 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
3049 clipboard_writer.WriteText(selected_text); 3057 clipboard_writer.WriteText(selected_text);
3050 } 3058 }
3051 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) 3059 #endif // defined(USE_X11) && !defined(OS_CHROMEOS)
3052 } 3060 }
3053 3061
3054 } // namespace content 3062 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.cc ('k') | services/ui/ws/frame_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698