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

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

Issue 1140813003: NTP Zombie Code Slayer III, The Saga Continues: Foreign Sessions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@suggestions-page
Patch Set: Created 5 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
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/ui/webui/history_ui.h" 5 #include "chrome/browser/ui/webui/history_ui.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "chrome/browser/supervised_user/supervised_user_service.h" 67 #include "chrome/browser/supervised_user/supervised_user_service.h"
68 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 68 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
69 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 69 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
70 #endif 70 #endif
71 71
72 #if defined(OS_ANDROID) 72 #if defined(OS_ANDROID)
73 #include "chrome/browser/android/chromium_application.h" 73 #include "chrome/browser/android/chromium_application.h"
74 #endif 74 #endif
75 75
76 #if !defined(OS_ANDROID) && !defined(OS_IOS) 76 #if !defined(OS_ANDROID) && !defined(OS_IOS)
77 #include "chrome/browser/ui/webui/ntp/foreign_session_handler.h" 77 #include "chrome/browser/ui/webui/foreign_session_handler.h"
78 #include "chrome/browser/ui/webui/ntp/ntp_login_handler.h" 78 #include "chrome/browser/ui/webui/ntp/ntp_login_handler.h"
79 #endif 79 #endif
80 80
81 using bookmarks::BookmarkModel; 81 using bookmarks::BookmarkModel;
82 82
83 static const char kStringsJsFile[] = "strings.js"; 83 static const char kStringsJsFile[] = "strings.js";
84 static const char kHistoryJsFile[] = "history.js"; 84 static const char kHistoryJsFile[] = "history.js";
85 static const char kOtherDevicesJsFile[] = "other_devices.js"; 85 static const char kOtherDevicesJsFile[] = "other_devices.js";
86 86
87 // The amount of time to wait for a response from the WebHistoryService. 87 // The amount of time to wait for a response from the WebHistoryService.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // authenticated. 121 // authenticated.
122 SigninManagerBase* signin_manager = 122 SigninManagerBase* signin_manager =
123 SigninManagerFactory::GetForProfile(profile); 123 SigninManagerFactory::GetForProfile(profile);
124 bool is_authenticated = signin_manager != nullptr && 124 bool is_authenticated = signin_manager != nullptr &&
125 signin_manager->IsAuthenticated(); 125 signin_manager->IsAuthenticated();
126 126
127 content::WebUIDataSource* source = 127 content::WebUIDataSource* source =
128 content::WebUIDataSource::Create(chrome::kChromeUIHistoryFrameHost); 128 content::WebUIDataSource::Create(chrome::kChromeUIHistoryFrameHost);
129 source->AddBoolean("isUserSignedIn", is_authenticated); 129 source->AddBoolean("isUserSignedIn", is_authenticated);
130 source->AddLocalizedString("collapseSessionMenuItemText", 130 source->AddLocalizedString("collapseSessionMenuItemText",
131 IDS_NEW_TAB_OTHER_SESSIONS_COLLAPSE_SESSION); 131 IDS_HISTORY_OTHER_SESSIONS_COLLAPSE_SESSION);
132 source->AddLocalizedString("expandSessionMenuItemText", 132 source->AddLocalizedString("expandSessionMenuItemText",
133 IDS_NEW_TAB_OTHER_SESSIONS_EXPAND_SESSION); 133 IDS_HISTORY_OTHER_SESSIONS_EXPAND_SESSION);
134 source->AddLocalizedString("restoreSessionMenuItemText", 134 source->AddLocalizedString("restoreSessionMenuItemText",
135 IDS_NEW_TAB_OTHER_SESSIONS_OPEN_ALL); 135 IDS_HISTORY_OTHER_SESSIONS_OPEN_ALL);
136 source->AddLocalizedString("xMore", IDS_OTHER_DEVICES_X_MORE); 136 source->AddLocalizedString("xMore", IDS_HISTORY_OTHER_DEVICES_X_MORE);
137 source->AddLocalizedString("loading", IDS_HISTORY_LOADING); 137 source->AddLocalizedString("loading", IDS_HISTORY_LOADING);
138 source->AddLocalizedString("title", IDS_HISTORY_TITLE); 138 source->AddLocalizedString("title", IDS_HISTORY_TITLE);
139 source->AddLocalizedString("newest", IDS_HISTORY_NEWEST); 139 source->AddLocalizedString("newest", IDS_HISTORY_NEWEST);
140 source->AddLocalizedString("newer", IDS_HISTORY_NEWER); 140 source->AddLocalizedString("newer", IDS_HISTORY_NEWER);
141 source->AddLocalizedString("older", IDS_HISTORY_OLDER); 141 source->AddLocalizedString("older", IDS_HISTORY_OLDER);
142 source->AddLocalizedString("searchResultsFor", IDS_HISTORY_SEARCHRESULTSFOR); 142 source->AddLocalizedString("searchResultsFor", IDS_HISTORY_SEARCHRESULTSFOR);
143 source->AddLocalizedString("searchResult", IDS_HISTORY_SEARCH_RESULT); 143 source->AddLocalizedString("searchResult", IDS_HISTORY_SEARCH_RESULT);
144 source->AddLocalizedString("searchResults", IDS_HISTORY_SEARCH_RESULTS); 144 source->AddLocalizedString("searchResults", IDS_HISTORY_SEARCH_RESULTS);
145 source->AddLocalizedString("foundSearchResults", 145 source->AddLocalizedString("foundSearchResults",
146 IDS_HISTORY_FOUND_SEARCH_RESULTS); 146 IDS_HISTORY_FOUND_SEARCH_RESULTS);
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 Profile* profile = Profile::FromWebUI(web_ui); 1041 Profile* profile = Profile::FromWebUI(web_ui);
1042 content::WebUIDataSource::Add(profile, CreateHistoryUIHTMLSource(profile)); 1042 content::WebUIDataSource::Add(profile, CreateHistoryUIHTMLSource(profile));
1043 } 1043 }
1044 1044
1045 // static 1045 // static
1046 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( 1046 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes(
1047 ui::ScaleFactor scale_factor) { 1047 ui::ScaleFactor scale_factor) {
1048 return ResourceBundle::GetSharedInstance(). 1048 return ResourceBundle::GetSharedInstance().
1049 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); 1049 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor);
1050 } 1050 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/foreign_session_handler.cc ('k') | chrome/browser/ui/webui/ntp/foreign_session_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698