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

Side by Side Diff: chrome/browser/android/shortcut_helper.cc

Issue 1234653004: webapps: utilize manifest theme colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing include Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/shortcut_helper.h" 5 #include "chrome/browser/android/shortcut_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 Java_ShortcutHelper_addShortcut( 161 Java_ShortcutHelper_addShortcut(
162 env, 162 env,
163 base::android::GetApplicationContext(), 163 base::android::GetApplicationContext(),
164 java_url.obj(), 164 java_url.obj(),
165 java_user_title.obj(), 165 java_user_title.obj(),
166 java_name.obj(), 166 java_name.obj(),
167 java_short_name.obj(), 167 java_short_name.obj(),
168 java_bitmap.obj(), 168 java_bitmap.obj(),
169 info.display == content::Manifest::DISPLAY_MODE_STANDALONE, 169 info.display == content::Manifest::DISPLAY_MODE_STANDALONE,
170 info.orientation, 170 info.orientation,
171 info.source); 171 info.source,
172 info.theme_color);
172 } 173 }
173 174
174 void ShortcutHelper::RecordAddToHomescreen() { 175 void ShortcutHelper::RecordAddToHomescreen() {
175 // Record that the shortcut has been added, so no banners will be shown 176 // Record that the shortcut has been added, so no banners will be shown
176 // for this app. 177 // for this app.
177 content::WebContents* web_contents = data_fetcher_->web_contents(); 178 content::WebContents* web_contents = data_fetcher_->web_contents();
178 if (!web_contents) 179 if (!web_contents)
179 return; 180 return;
180 181
181 AppBannerSettingsHelper::RecordBannerEvent( 182 AppBannerSettingsHelper::RecordBannerEvent(
182 web_contents, web_contents->GetURL(), 183 web_contents, web_contents->GetURL(),
183 data_fetcher_->shortcut_info().url.spec(), 184 data_fetcher_->shortcut_info().url.spec(),
184 AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN, 185 AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN,
185 base::Time::Now()); 186 base::Time::Now());
186 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698