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

Side by Side Diff: chrome/browser/extensions/api/session_restore/session_restore_api.cc

Issue 14497003: Moves TabNavigation into components/sessions and renames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really remove webkit_support Created 7 years, 7 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/DEPS ('k') | chrome/browser/jumplist_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/session_restore/session_restore_api.h" 5 #include "chrome/browser/extensions/api/session_restore/session_restore_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 namespace GetRecentlyClosed = api::session_restore::GetRecentlyClosed; 44 namespace GetRecentlyClosed = api::session_restore::GetRecentlyClosed;
45 namespace Restore = api::session_restore::Restore; 45 namespace Restore = api::session_restore::Restore;
46 namespace tabs = api::tabs; 46 namespace tabs = api::tabs;
47 namespace windows = api::windows; 47 namespace windows = api::windows;
48 namespace session_restore = api::session_restore; 48 namespace session_restore = api::session_restore;
49 49
50 scoped_ptr<tabs::Tab> SessionRestoreGetRecentlyClosedFunction::CreateTabModel( 50 scoped_ptr<tabs::Tab> SessionRestoreGetRecentlyClosedFunction::CreateTabModel(
51 const TabRestoreService::Tab& tab, int selected_index) { 51 const TabRestoreService::Tab& tab, int selected_index) {
52 scoped_ptr<tabs::Tab> tab_struct(new tabs::Tab); 52 scoped_ptr<tabs::Tab> tab_struct(new tabs::Tab);
53 const TabNavigation& current_navigation = 53 const sessions::SerializedNavigationEntry& current_navigation =
54 tab.navigations[tab.current_navigation_index]; 54 tab.navigations[tab.current_navigation_index];
55 GURL gurl = current_navigation.virtual_url(); 55 GURL gurl = current_navigation.virtual_url();
56 std::string title = UTF16ToUTF8(current_navigation.title()); 56 std::string title = UTF16ToUTF8(current_navigation.title());
57 57
58 tab_struct->url.reset(new std::string(gurl.spec())); 58 tab_struct->url.reset(new std::string(gurl.spec()));
59 tab_struct->title.reset(new std::string(title.empty() ? gurl.spec() : title)); 59 tab_struct->title.reset(new std::string(title.empty() ? gurl.spec() : title));
60 tab_struct->index = tab.tabstrip_index; 60 tab_struct->index = tab.tabstrip_index;
61 tab_struct->pinned = tab.pinned; 61 tab_struct->pinned = tab.pinned;
62 tab_struct->id = tab.id; 62 tab_struct->id = tab.id;
63 tab_struct->window_id = tab.browser_id; 63 tab_struct->window_id = tab.browser_id;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 static base::LazyInstance<ProfileKeyedAPIFactory<SessionRestoreAPI> > 230 static base::LazyInstance<ProfileKeyedAPIFactory<SessionRestoreAPI> >
231 g_factory = LAZY_INSTANCE_INITIALIZER; 231 g_factory = LAZY_INSTANCE_INITIALIZER;
232 232
233 // static 233 // static
234 ProfileKeyedAPIFactory<SessionRestoreAPI>* 234 ProfileKeyedAPIFactory<SessionRestoreAPI>*
235 SessionRestoreAPI::GetFactoryInstance() { 235 SessionRestoreAPI::GetFactoryInstance() {
236 return &g_factory.Get(); 236 return &g_factory.Get();
237 } 237 }
238 238
239 } // namespace extensions 239 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/DEPS ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698