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

Side by Side Diff: extensions/renderer/guest_view/extensions_guest_view_container.cc

Issue 821453003: Update legacy Tuple-using code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/guest_view/extensions_guest_view_container.h" 5 #include "extensions/renderer/guest_view/extensions_guest_view_container.h"
6 6
7 #include "content/public/renderer/render_frame.h" 7 #include "content/public/renderer/render_frame.h"
8 #include "content/public/renderer/render_view.h" 8 #include "content/public/renderer/render_view.h"
9 #include "extensions/common/extension_messages.h" 9 #include "extensions/common/extension_messages.h"
10 #include "extensions/common/guest_view/guest_view_constants.h" 10 #include "extensions/common/guest_view/guest_view_constants.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const IPC::Message& message) { 72 const IPC::Message& message) {
73 ExtensionMsg_GuestAttached::Param param; 73 ExtensionMsg_GuestAttached::Param param;
74 if (!ExtensionMsg_GuestAttached::Read(&message, &param)) 74 if (!ExtensionMsg_GuestAttached::Read(&message, &param))
75 return; 75 return;
76 76
77 // If we don't have a callback then there's nothing more to do. 77 // If we don't have a callback then there's nothing more to do.
78 if (!HasCallback()) 78 if (!HasCallback())
79 return; 79 return;
80 80
81 content::RenderView* guest_proxy_render_view = 81 content::RenderView* guest_proxy_render_view =
82 content::RenderView::FromRoutingID(param.b); 82 content::RenderView::FromRoutingID(get<1>(param));
83 // TODO(fsamuel): Should we be reporting an error to JavaScript or DCHECKing? 83 // TODO(fsamuel): Should we be reporting an error to JavaScript or DCHECKing?
84 if (!guest_proxy_render_view) 84 if (!guest_proxy_render_view)
85 return; 85 return;
86 86
87 v8::HandleScope handle_scope(isolate()); 87 v8::HandleScope handle_scope(isolate());
88 v8::Handle<v8::Function> callback = GetCallback(); 88 v8::Handle<v8::Function> callback = GetCallback();
89 v8::Handle<v8::Context> context = callback->CreationContext(); 89 v8::Handle<v8::Context> context = callback->CreationContext();
90 if (context.IsEmpty()) 90 if (context.IsEmpty())
91 return; 91 return;
92 92
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 void ExtensionsGuestViewContainer::HandlePendingResponseCallback( 233 void ExtensionsGuestViewContainer::HandlePendingResponseCallback(
234 const IPC::Message& message) { 234 const IPC::Message& message) {
235 CHECK(pending_response_.get()); 235 CHECK(pending_response_.get());
236 linked_ptr<Request> pending_response(pending_response_.release()); 236 linked_ptr<Request> pending_response(pending_response_.release());
237 pending_response->HandleResponse(message); 237 pending_response->HandleResponse(message);
238 } 238 }
239 239
240 } // namespace extensions 240 } // namespace extensions
OLDNEW
« no previous file with comments | « content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc ('k') | ppapi/host/dispatch_host_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698