OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/dom_ui.h" | 5 #include "chrome/browser/dom_ui/dom_ui.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 parameters += UTF8ToWide(json); | 31 parameters += UTF8ToWide(json); |
32 } | 32 } |
33 return function_name + L"(" + parameters + L");"; | 33 return function_name + L"(" + parameters + L");"; |
34 } | 34 } |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 DOMUI::DOMUI(TabContents* contents) | 38 DOMUI::DOMUI(TabContents* contents) |
39 : hide_favicon_(false), | 39 : hide_favicon_(false), |
40 force_bookmark_bar_visible_(false), | 40 force_bookmark_bar_visible_(false), |
41 force_extension_shelf_visible_(false), | |
42 focus_location_bar_by_default_(false), | 41 focus_location_bar_by_default_(false), |
43 should_hide_url_(false), | 42 should_hide_url_(false), |
44 link_transition_type_(PageTransition::LINK), | 43 link_transition_type_(PageTransition::LINK), |
45 bindings_(BindingsPolicy::DOM_UI), | 44 bindings_(BindingsPolicy::DOM_UI), |
46 tab_contents_(contents) { | 45 tab_contents_(contents) { |
47 } | 46 } |
48 | 47 |
49 DOMUI::~DOMUI() { | 48 DOMUI::~DOMUI() { |
50 STLDeleteContainerPairSecondPointers(message_callbacks_.begin(), | 49 STLDeleteContainerPairSecondPointers(message_callbacks_.begin(), |
51 message_callbacks_.end()); | 50 message_callbacks_.end()); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 178 |
180 std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) { | 179 std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) { |
181 if (value && value->GetType() == Value::TYPE_LIST) { | 180 if (value && value->GetType() == Value::TYPE_LIST) { |
182 const ListValue* list_value = static_cast<const ListValue*>(value); | 181 const ListValue* list_value = static_cast<const ListValue*>(value); |
183 std::wstring wstring_value; | 182 std::wstring wstring_value; |
184 if (list_value->GetString(0, &wstring_value)) | 183 if (list_value->GetString(0, &wstring_value)) |
185 return wstring_value; | 184 return wstring_value; |
186 } | 185 } |
187 return std::wstring(); | 186 return std::wstring(); |
188 } | 187 } |
OLD | NEW |