OLD | NEW |
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/android/fullscreen/fullscreen_infobar_delegate.h" | 5 #include "chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/pref_service.h" | |
10 #include "chrome/browser/android/android_theme_resources.h" | 9 #include "chrome/browser/android/android_theme_resources.h" |
11 #include "chrome/browser/android/tab_android.h" | 10 #include "chrome/browser/android/tab_android.h" |
12 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
15 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
16 #include "components/infobars/core/infobar.h" | 15 #include "components/infobars/core/infobar.h" |
| 16 #include "components/prefs/pref_service.h" |
17 #include "components/url_formatter/elide_url.h" | 17 #include "components/url_formatter/elide_url.h" |
18 #include "grit/components_strings.h" | 18 #include "grit/components_strings.h" |
19 #include "jni/FullscreenInfoBarDelegate_jni.h" | 19 #include "jni/FullscreenInfoBarDelegate_jni.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
22 | 22 |
23 // static | 23 // static |
24 jlong LaunchFullscreenInfoBar(JNIEnv* env, | 24 jlong LaunchFullscreenInfoBar(JNIEnv* env, |
25 const JavaParamRef<jobject>& obj, | 25 const JavaParamRef<jobject>& obj, |
26 const JavaParamRef<jobject>& tab) { | 26 const JavaParamRef<jobject>& tab) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 Java_FullscreenInfoBarDelegate_onFullscreenAllowed( | 93 Java_FullscreenInfoBarDelegate_onFullscreenAllowed( |
94 env, j_delegate_.obj(), j_origin.obj()); | 94 env, j_delegate_.obj(), j_origin.obj()); |
95 return true; | 95 return true; |
96 } | 96 } |
97 | 97 |
98 bool FullscreenInfoBarDelegate::Cancel() { | 98 bool FullscreenInfoBarDelegate::Cancel() { |
99 Java_FullscreenInfoBarDelegate_onFullscreenCancelled( | 99 Java_FullscreenInfoBarDelegate_onFullscreenCancelled( |
100 base::android::AttachCurrentThread(), j_delegate_.obj()); | 100 base::android::AttachCurrentThread(), j_delegate_.obj()); |
101 return true; | 101 return true; |
102 } | 102 } |
OLD | NEW |