OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/ui/webui/cookies_tree_model_adapter.h" | 5 #include "chrome/browser/ui/webui/cookies_tree_model_adapter.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" | 10 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 scoped_ptr<Value> parend_id(GetTreeNodeId(model_->AsNode(parent))); | 121 scoped_ptr<Value> parend_id(GetTreeNodeId(model_->AsNode(parent))); |
122 ListValue children; | 122 ListValue children; |
123 cookies_tree_model_util::GetChildNodeList(parent, 0, parent->child_count(), | 123 cookies_tree_model_util::GetChildNodeList(parent, 0, parent->child_count(), |
124 &children); | 124 &children); |
125 web_ui_->CallJavascriptFunction("ui.CookiesTree.setChildren", | 125 web_ui_->CallJavascriptFunction("ui.CookiesTree.setChildren", |
126 tree_id, *parend_id.get(), children); | 126 tree_id, *parend_id.get(), children); |
127 } | 127 } |
128 | 128 |
129 Value* CookiesTreeModelAdapter::GetTreeNodeId(CookieTreeNode* node) { | 129 Value* CookiesTreeModelAdapter::GetTreeNodeId(CookieTreeNode* node) { |
130 if (node == model_->GetRoot()) | 130 if (node == model_->GetRoot()) |
131 return Value::CreateNullValue(); | 131 return base::NullValue(); |
132 | 132 |
133 return Value::CreateStringValue( | 133 return Value::CreateStringValue( |
134 cookies_tree_model_util::GetTreeNodeId(node)); | 134 cookies_tree_model_util::GetTreeNodeId(node)); |
135 } | 135 } |
OLD | NEW |