OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |