| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/renderer/dom_ui_bindings.h" | 5 #include "chrome/renderer/dom_ui_bindings.h" |
| 6 | 6 |
| 7 #include "base/json_writer.h" | 7 #include "base/json_writer.h" |
| 8 #include "base/stl_util-inl.h" |
| 8 #include "base/values.h" | 9 #include "base/values.h" |
| 9 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/common/stl_util-inl.h" | |
| 11 | 11 |
| 12 DOMBoundBrowserObject::~DOMBoundBrowserObject() { | 12 DOMBoundBrowserObject::~DOMBoundBrowserObject() { |
| 13 STLDeleteContainerPointers(properties_.begin(), properties_.end()); | 13 STLDeleteContainerPointers(properties_.begin(), properties_.end()); |
| 14 } | 14 } |
| 15 | 15 |
| 16 DOMUIBindings::DOMUIBindings() { | 16 DOMUIBindings::DOMUIBindings() { |
| 17 BindMethod("send", &DOMUIBindings::send); | 17 BindMethod("send", &DOMUIBindings::send); |
| 18 } | 18 } |
| 19 | 19 |
| 20 void DOMUIBindings::send(const CppArgumentList& args, CppVariant* result) { | 20 void DOMUIBindings::send(const CppArgumentList& args, CppVariant* result) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 48 new ViewHostMsg_DOMUISend(routing_id(), message, content)); | 48 new ViewHostMsg_DOMUISend(routing_id(), message, content)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void DOMBoundBrowserObject::SetProperty(const std::string& name, | 51 void DOMBoundBrowserObject::SetProperty(const std::string& name, |
| 52 const std::string& value) { | 52 const std::string& value) { |
| 53 CppVariant* cpp_value = new CppVariant; | 53 CppVariant* cpp_value = new CppVariant; |
| 54 cpp_value->Set(value); | 54 cpp_value->Set(value); |
| 55 BindProperty(name, cpp_value); | 55 BindProperty(name, cpp_value); |
| 56 properties_.push_back(cpp_value); | 56 properties_.push_back(cpp_value); |
| 57 } | 57 } |
| OLD | NEW |