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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2012933002: Enable sending frame-specific messages to the correct input router. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 RenderWidgetHostImpl::From(view->GetRenderWidgetHost())->is_hidden() 471 RenderWidgetHostImpl::From(view->GetRenderWidgetHost())->is_hidden()
472 ? blink::WebPageVisibilityStateHidden 472 ? blink::WebPageVisibilityStateHidden
473 : blink::WebPageVisibilityStateVisible; 473 : blink::WebPageVisibilityStateVisible;
474 GetContentClient()->browser()->OverridePageVisibilityState(this, 474 GetContentClient()->browser()->OverridePageVisibilityState(this,
475 &visibility_state); 475 &visibility_state);
476 return visibility_state; 476 return visibility_state;
477 } 477 }
478 478
479 bool RenderFrameHostImpl::Send(IPC::Message* message) { 479 bool RenderFrameHostImpl::Send(IPC::Message* message) {
480 if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) { 480 if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) {
481 return render_view_host_->GetWidget()->input_router()->SendInput( 481 return GetRenderWidgetHost()->input_router()->SendInput(
482 base::WrapUnique(message)); 482 base::WrapUnique(message));
483 } 483 }
484 484
485 return GetProcess()->Send(message); 485 return GetProcess()->Send(message);
486 } 486 }
487 487
488 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { 488 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
489 // Only process messages if the RenderFrame is alive. 489 // Only process messages if the RenderFrame is alive.
490 if (!render_frame_created_) 490 if (!render_frame_created_)
491 return false; 491 return false;
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2841 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2842 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2842 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2843 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2843 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2844 } 2844 }
2845 2845
2846 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2846 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2847 web_bluetooth_service_.reset(); 2847 web_bluetooth_service_.reset();
2848 } 2848 }
2849 2849
2850 } // namespace content 2850 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698