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

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

Issue 2372453002: [Experimental - DO NOT LAND] Use border-image for MD History shadows. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/resources/md_history/images/100/shadow_border.png ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/md_history_ui.h" 5 #include "chrome/browser/ui/webui/md_history_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 source->AddBoolean("isGuestSession", profile->IsGuestSession()); 127 source->AddBoolean("isGuestSession", profile->IsGuestSession());
128 128
129 SigninManagerBase* signin_manager = 129 SigninManagerBase* signin_manager =
130 SigninManagerFactory::GetForProfile(profile); 130 SigninManagerFactory::GetForProfile(profile);
131 bool is_authenticated = signin_manager != nullptr && 131 bool is_authenticated = signin_manager != nullptr &&
132 signin_manager->IsAuthenticated(); 132 signin_manager->IsAuthenticated();
133 source->AddBoolean("isUserSignedIn", is_authenticated); 133 source->AddBoolean("isUserSignedIn", is_authenticated);
134 134
135 source->AddResourcePath("constants.html", IDR_MD_HISTORY_CONSTANTS_HTML); 135 source->AddResourcePath("constants.html", IDR_MD_HISTORY_CONSTANTS_HTML);
136 source->AddResourcePath("constants.js", IDR_MD_HISTORY_CONSTANTS_JS); 136 source->AddResourcePath("constants.js", IDR_MD_HISTORY_CONSTANTS_JS);
137 source->AddResourcePath("images/100/shadow_border.png",
138 IDR_MD_HISTORY_IMAGES_100_SHADOW_BORDER_PNG);
137 source->AddResourcePath("images/100/sign_in_promo.png", 139 source->AddResourcePath("images/100/sign_in_promo.png",
138 IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_PNG); 140 IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_PNG);
139 source->AddResourcePath("images/200/sign_in_promo.png", 141 source->AddResourcePath("images/200/sign_in_promo.png",
140 IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_PNG); 142 IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_PNG);
141 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); 143 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS);
142 144
143 #if BUILDFLAG(USE_VULCANIZE) 145 #if BUILDFLAG(USE_VULCANIZE)
144 source->AddResourcePath("app.html", 146 source->AddResourcePath("app.html",
145 IDR_MD_HISTORY_APP_VULCANIZED_HTML); 147 IDR_MD_HISTORY_APP_VULCANIZED_HTML);
146 source->AddResourcePath("app.crisper.js", 148 source->AddResourcePath("app.crisper.js",
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 user_prefs::PrefRegistrySyncable* registry) { 260 user_prefs::PrefRegistrySyncable* registry) {
259 registry->RegisterBooleanPref(prefs::kMdHistoryMenuPromoShown, false, 261 registry->RegisterBooleanPref(prefs::kMdHistoryMenuPromoShown, false,
260 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 262 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
261 } 263 }
262 264
263 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { 265 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) {
264 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( 266 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean(
265 prefs::kMdHistoryMenuPromoShown, true); 267 prefs::kMdHistoryMenuPromoShown, true);
266 data_source_->AddBoolean("showMenuPromo", false); 268 data_source_->AddBoolean("showMenuPromo", false);
267 } 269 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/images/100/shadow_border.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698