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

Side by Side Diff: chrome/browser/dom_ui/dom_ui.cc

Issue 3012042: Revert 54560 - ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.h ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 ThemeProvider* DOMUI::GetThemeProvider() const { 80 ThemeProvider* DOMUI::GetThemeProvider() const {
81 return tab_contents_->profile()->GetThemeProvider(); 81 return tab_contents_->profile()->GetThemeProvider();
82 } 82 }
83 83
84 void DOMUI::RegisterMessageCallback(const std::string &message, 84 void DOMUI::RegisterMessageCallback(const std::string &message,
85 MessageCallback *callback) { 85 MessageCallback *callback) {
86 message_callbacks_.insert(std::make_pair(message, callback)); 86 message_callbacks_.insert(std::make_pair(message, callback));
87 } 87 }
88 88
89 Profile* DOMUI::GetProfile() const { 89 Profile* DOMUI::GetProfile() {
90 return tab_contents()->profile(); 90 return tab_contents()->profile();
91 } 91 }
92 92
93 // DOMUI, protected: ---------------------------------------------------------- 93 // DOMUI, protected: ----------------------------------------------------------
94 94
95 void DOMUI::AddMessageHandler(DOMMessageHandler* handler) { 95 void DOMUI::AddMessageHandler(DOMMessageHandler* handler) {
96 handlers_.push_back(handler); 96 handlers_.push_back(handler);
97 } 97 }
98 98
99 // DOMUI, private: ------------------------------------------------------------ 99 // DOMUI, private: ------------------------------------------------------------
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) { 158 std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) {
159 if (value && value->GetType() == Value::TYPE_LIST) { 159 if (value && value->GetType() == Value::TYPE_LIST) {
160 const ListValue* list_value = static_cast<const ListValue*>(value); 160 const ListValue* list_value = static_cast<const ListValue*>(value);
161 std::wstring wstring_value; 161 std::wstring wstring_value;
162 if (list_value->GetString(0, &wstring_value)) 162 if (list_value->GetString(0, &wstring_value))
163 return wstring_value; 163 return wstring_value;
164 } 164 }
165 return std::wstring(); 165 return std::wstring();
166 } 166 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.h ('k') | chrome/browser/dom_ui/history2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698