OLD | NEW |
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/renderer/browser_plugin/browser_plugin_bindings.h" | 5 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 return false; | 242 return false; |
243 | 243 |
244 scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); | 244 scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); |
245 v8::Handle<v8::Value> obj(blink::WebBindings::toV8Value(&args[0])); | 245 v8::Handle<v8::Value> obj(blink::WebBindings::toV8Value(&args[0])); |
246 scoped_ptr<base::Value> value( | 246 scoped_ptr<base::Value> value( |
247 converter->FromV8Value(obj, bindings->instance()->render_view()-> | 247 converter->FromV8Value(obj, bindings->instance()->render_view()-> |
248 GetWebView()->mainFrame()->mainWorldScriptContext())); | 248 GetWebView()->mainFrame()->mainWorldScriptContext())); |
249 if (!value) | 249 if (!value) |
250 return false; | 250 return false; |
251 | 251 |
252 if (!value->IsType(Value::TYPE_DICTIONARY)) | 252 if (!value->IsType(base::Value::TYPE_DICTIONARY)) |
253 return false; | 253 return false; |
254 | 254 |
255 scoped_ptr<base::DictionaryValue> extra_params( | 255 scoped_ptr<base::DictionaryValue> extra_params( |
256 static_cast<base::DictionaryValue*>(value.release())); | 256 static_cast<base::DictionaryValue*>(value.release())); |
257 bindings->instance()->Attach(extra_params.Pass()); | 257 bindings->instance()->Attach(extra_params.Pass()); |
258 return true; | 258 return true; |
259 } | 259 } |
260 | 260 |
261 private: | 261 private: |
262 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingAttach); | 262 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBindingAttach); |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 for (PropertyBindingList::iterator iter = property_bindings_.begin(); | 756 for (PropertyBindingList::iterator iter = property_bindings_.begin(); |
757 iter != property_bindings_.end(); | 757 iter != property_bindings_.end(); |
758 ++iter) { | 758 ++iter) { |
759 if ((*iter)->MatchesName(name)) | 759 if ((*iter)->MatchesName(name)) |
760 return (*iter)->GetProperty(this, result); | 760 return (*iter)->GetProperty(this, result); |
761 } | 761 } |
762 return false; | 762 return false; |
763 } | 763 } |
764 | 764 |
765 } // namespace content | 765 } // namespace content |
OLD | NEW |