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

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

Issue 2322233003: Enable sending frame-specific messages to the correct input router. (Closed)
Patch Set: Created 4 years, 3 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 blink::WebPageVisibilityState visibility_state = 521 blink::WebPageVisibilityState visibility_state =
522 GetRenderWidgetHost()->is_hidden() ? blink::WebPageVisibilityStateHidden 522 GetRenderWidgetHost()->is_hidden() ? blink::WebPageVisibilityStateHidden
523 : blink::WebPageVisibilityStateVisible; 523 : blink::WebPageVisibilityStateVisible;
524 GetContentClient()->browser()->OverridePageVisibilityState(this, 524 GetContentClient()->browser()->OverridePageVisibilityState(this,
525 &visibility_state); 525 &visibility_state);
526 return visibility_state; 526 return visibility_state;
527 } 527 }
528 528
529 bool RenderFrameHostImpl::Send(IPC::Message* message) { 529 bool RenderFrameHostImpl::Send(IPC::Message* message) {
530 if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) { 530 if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) {
531 return render_view_host_->GetWidget()->input_router()->SendInput( 531 return GetRenderWidgetHost()->input_router()->SendInput(
532 base::WrapUnique(message)); 532 base::WrapUnique(message));
533 } 533 }
534 534
535 return GetProcess()->Send(message); 535 return GetProcess()->Send(message);
536 } 536 }
537 537
538 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { 538 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
539 // Only process messages if the RenderFrame is alive. 539 // Only process messages if the RenderFrame is alive.
540 if (!render_frame_created_) 540 if (!render_frame_created_)
541 return false; 541 return false;
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3055 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3056 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3056 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3057 return web_bluetooth_service_.get(); 3057 return web_bluetooth_service_.get();
3058 } 3058 }
3059 3059
3060 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3060 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3061 web_bluetooth_service_.reset(); 3061 web_bluetooth_service_.reset();
3062 } 3062 }
3063 3063
3064 } // namespace content 3064 } // 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