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

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

Issue 2819086: Removal of TabContentsDelegate::GetBrowser() interface method (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/filebrowse_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) 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 ThemeProvider* DOMUI::GetThemeProvider() const { 103 ThemeProvider* DOMUI::GetThemeProvider() const {
104 return tab_contents_->profile()->GetThemeProvider(); 104 return tab_contents_->profile()->GetThemeProvider();
105 } 105 }
106 106
107 void DOMUI::RegisterMessageCallback(const std::string &message, 107 void DOMUI::RegisterMessageCallback(const std::string &message,
108 MessageCallback *callback) { 108 MessageCallback *callback) {
109 message_callbacks_.insert(std::make_pair(message, callback)); 109 message_callbacks_.insert(std::make_pair(message, callback));
110 } 110 }
111 111
112 Profile* DOMUI::GetProfile() { 112 Profile* DOMUI::GetProfile() const {
113 return tab_contents()->profile(); 113 return tab_contents()->profile();
114 } 114 }
115 115
116 // DOMUI, protected: ---------------------------------------------------------- 116 // DOMUI, protected: ----------------------------------------------------------
117 117
118 void DOMUI::AddMessageHandler(DOMMessageHandler* handler) { 118 void DOMUI::AddMessageHandler(DOMMessageHandler* handler) {
119 handlers_.push_back(handler); 119 handlers_.push_back(handler);
120 } 120 }
121 121
122 // DOMUI, private: ------------------------------------------------------------ 122 // DOMUI, private: ------------------------------------------------------------
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) { 180 std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) {
181 if (value && value->GetType() == Value::TYPE_LIST) { 181 if (value && value->GetType() == Value::TYPE_LIST) {
182 const ListValue* list_value = static_cast<const ListValue*>(value); 182 const ListValue* list_value = static_cast<const ListValue*>(value);
183 std::wstring wstring_value; 183 std::wstring wstring_value;
184 if (list_value->GetString(0, &wstring_value)) 184 if (list_value->GetString(0, &wstring_value))
185 return wstring_value; 185 return wstring_value;
186 } 186 }
187 return std::wstring(); 187 return std::wstring();
188 } 188 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.h ('k') | chrome/browser/dom_ui/filebrowse_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698