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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 944443003: Step two of optionally sending messages to/from message ports as base::Value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-c-message-as-values-take2
Patch Set: use auto where it makes sense Created 5 years, 9 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 4002 matching lines...) Expand 10 before | Expand all | Expand 10 after
4013 } 4013 }
4014 } else { 4014 } else {
4015 // We couldn't find it, so don't pass a source frame. 4015 // We couldn't find it, so don't pass a source frame.
4016 new_params.source_routing_id = MSG_ROUTING_NONE; 4016 new_params.source_routing_id = MSG_ROUTING_NONE;
4017 } 4017 }
4018 } 4018 }
4019 4019
4020 // In most cases, we receive this from a swapped out RenderViewHost. 4020 // In most cases, we receive this from a swapped out RenderViewHost.
4021 // It is possible to receive it from one that has just been swapped in, 4021 // It is possible to receive it from one that has just been swapped in,
4022 // in which case we might as well deliver the message anyway. 4022 // in which case we might as well deliver the message anyway.
4023 if (!params.message_port_ids.empty()) { 4023 if (!params.message_ports.empty()) {
4024 // Updating the message port information has to be done in the IO thread; 4024 // Updating the message port information has to be done in the IO thread;
4025 // MessagePortMessageFilter::RouteMessageEventWithMessagePorts will send 4025 // MessagePortMessageFilter::RouteMessageEventWithMessagePorts will send
4026 // ViewMsg_PostMessageEvent after it's done. Note that a trivial solution 4026 // ViewMsg_PostMessageEvent after it's done. Note that a trivial solution
4027 // would've been to post a task on the IO thread to do the IO-thread-bound 4027 // would've been to post a task on the IO thread to do the IO-thread-bound
4028 // work, and make that post a task back to WebContentsImpl in the UI 4028 // work, and make that post a task back to WebContentsImpl in the UI
4029 // thread. But we cannot do that, since there's nothing to guarantee that 4029 // thread. But we cannot do that, since there's nothing to guarantee that
4030 // WebContentsImpl stays alive during the round trip. 4030 // WebContentsImpl stays alive during the round trip.
4031 scoped_refptr<MessagePortMessageFilter> message_port_message_filter( 4031 scoped_refptr<MessagePortMessageFilter> message_port_message_filter(
4032 static_cast<RenderProcessHostImpl*>(GetRenderProcessHost()) 4032 static_cast<RenderProcessHostImpl*>(GetRenderProcessHost())
4033 ->message_port_message_filter()); 4033 ->message_port_message_filter());
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
4516 node->render_manager()->ResumeResponseDeferredAtStart(); 4516 node->render_manager()->ResumeResponseDeferredAtStart();
4517 } 4517 }
4518 4518
4519 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4519 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4520 force_disable_overscroll_content_ = force_disable; 4520 force_disable_overscroll_content_ = force_disable;
4521 if (view_) 4521 if (view_)
4522 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4522 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4523 } 4523 }
4524 4524
4525 } // namespace content 4525 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698