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

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

Issue 624063002: <webview>: resizing with display:none set should resize on attachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Istiaque's comments Created 6 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
« no previous file with comments | « extensions/renderer/guest_view/guest_view_container.cc ('k') | 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 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/guest_view_internal_custom_bindings.h" 5 #include "extensions/renderer/guest_view/guest_view_internal_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "content/public/renderer/render_view.h" 10 #include "content/public/renderer/render_view.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 scoped_ptr<base::DictionaryValue> params; 57 scoped_ptr<base::DictionaryValue> params;
58 { 58 {
59 scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); 59 scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
60 scoped_ptr<base::Value> params_as_value( 60 scoped_ptr<base::Value> params_as_value(
61 converter->FromV8Value(args[2], context()->v8_context())); 61 converter->FromV8Value(args[2], context()->v8_context()));
62 CHECK(params_as_value->IsType(base::Value::TYPE_DICTIONARY)); 62 CHECK(params_as_value->IsType(base::Value::TYPE_DICTIONARY));
63 params.reset( 63 params.reset(
64 static_cast<base::DictionaryValue*>(params_as_value.release())); 64 static_cast<base::DictionaryValue*>(params_as_value.release()));
65 } 65 }
66 66
67 guest_view_container->AttachGuest( 67 linked_ptr<GuestViewContainer::AttachRequest> request(
68 element_instance_id, 68 new GuestViewContainer::AttachRequest(
69 guest_instance_id, 69 element_instance_id,
70 params.Pass(), 70 guest_instance_id,
71 args.Length() == 4 ? args[3].As<v8::Function>() : 71 params.Pass(),
72 v8::Handle<v8::Function>(), 72 args.Length() == 4 ? args[3].As<v8::Function>() :
73 args.GetIsolate()); 73 v8::Handle<v8::Function>(),
74 args.GetIsolate()));
75 guest_view_container->AttachGuest(request);
74 76
75 args.GetReturnValue().Set(v8::Boolean::New(context()->isolate(), true)); 77 args.GetReturnValue().Set(v8::Boolean::New(context()->isolate(), true));
76 } 78 }
77 79
78 } // namespace extensions 80 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/guest_view/guest_view_container.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698