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

Side by Side Diff: chrome/browser/ui/webui/sessions_ui.cc

Issue 8590031: Added machine names to about:sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed quotation marks. Created 9 years, 1 month 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/resources/sessions.js ('k') | no next file » | 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) 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/sessions_ui.h" 5 #include "chrome/browser/ui/webui/sessions_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 void SessionsDOMHandler::GetSessionList( 179 void SessionsDOMHandler::GetSessionList(
180 const std::vector<const browser_sync::SyncedSession*>& sessions, 180 const std::vector<const browser_sync::SyncedSession*>& sessions,
181 ListValue* session_list) { 181 ListValue* session_list) {
182 for (std::vector<const browser_sync::SyncedSession*>::const_iterator it = 182 for (std::vector<const browser_sync::SyncedSession*>::const_iterator it =
183 sessions.begin(); it != sessions.end(); ++it) { 183 sessions.begin(); it != sessions.end(); ++it) {
184 const browser_sync::SyncedSession* session = *it; 184 const browser_sync::SyncedSession* session = *it;
185 scoped_ptr<DictionaryValue> session_data(new DictionaryValue()); 185 scoped_ptr<DictionaryValue> session_data(new DictionaryValue());
186 session_data->SetString("tag", session->session_tag); 186 session_data->SetString("tag", session->session_tag);
187 session_data->SetString("name", session->session_name);
187 scoped_ptr<ListValue> window_list(new ListValue()); 188 scoped_ptr<ListValue> window_list(new ListValue());
188 GetWindowList(session->windows, window_list.get()); 189 GetWindowList(session->windows, window_list.get());
189 session_data->Set("windows", window_list.release()); 190 session_data->Set("windows", window_list.release());
190 session_list->Append(session_data.release()); 191 session_list->Append(session_data.release());
191 } 192 }
192 } 193 }
193 194
194 void SessionsDOMHandler::GetAllTabs( 195 void SessionsDOMHandler::GetAllTabs(
195 const std::vector<const browser_sync::SyncedSession*>& sessions, 196 const std::vector<const browser_sync::SyncedSession*>& sessions,
196 std::vector<SessionTab*>* all_tabs) { 197 std::vector<SessionTab*>* all_tabs) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); 265 Profile* profile = Profile::FromBrowserContext(contents->browser_context());
265 profile->GetChromeURLDataManager()->AddDataSource( 266 profile->GetChromeURLDataManager()->AddDataSource(
266 CreateSessionsUIHTMLSource()); 267 CreateSessionsUIHTMLSource());
267 } 268 }
268 269
269 // static 270 // static
270 RefCountedMemory* SessionsUI::GetFaviconResourceBytes() { 271 RefCountedMemory* SessionsUI::GetFaviconResourceBytes() {
271 return ResourceBundle::GetSharedInstance(). 272 return ResourceBundle::GetSharedInstance().
272 LoadDataResourceBytes(IDR_HISTORY_FAVICON); 273 LoadDataResourceBytes(IDR_HISTORY_FAVICON);
273 } 274 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/sessions.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698