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 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Returns the query value for |name| in |url|, e.g. example.com?name=value. | 87 // Returns the query value for |name| in |url|, e.g. example.com?name=value. |
88 std::string ExtractQueryValueForName(const GURL& url, | 88 std::string ExtractQueryValueForName(const GURL& url, |
89 const std::string& name); | 89 const std::string& name); |
90 | 90 |
91 // Returns true if |platform|, |url|, and |id| are consistent and can be used | 91 // Returns true if |platform|, |url|, and |id| are consistent and can be used |
92 // to query the Play Store for a native app. The query may not necessarily | 92 // to query the Play Store for a native app. The query may not necessarily |
93 // succeed (e.g. |id| doesn't map to anything), but if this method returns | 93 // succeed (e.g. |id| doesn't map to anything), but if this method returns |
94 // true, only a native app banner may be shown, and the web app banner flow | 94 // true, only a native app banner may be shown, and the web app banner flow |
95 // will not be run. | 95 // will not be run. |
96 bool CanHandleNonWebApp(const std::string& platform, | 96 bool CanHandleNonWebApp(const std::string& platform, |
97 const GURL& url, | 97 const GURL& url, |
98 const std::string& id); | 98 const std::string& id); |
99 | 99 |
100 // The Java-side AppBannerManager. | 100 // The Java-side AppBannerManager. |
101 base::android::ScopedJavaGlobalRef<jobject> java_banner_manager_; | 101 base::android::ScopedJavaGlobalRef<jobject> java_banner_manager_; |
102 | 102 |
103 // Java-side object containing data about a native app. | 103 // Java-side object containing data about a native app. |
104 base::android::ScopedJavaGlobalRef<jobject> native_app_data_; | 104 base::android::ScopedJavaGlobalRef<jobject> native_app_data_; |
105 | 105 |
106 // App package name for a native app banner. | 106 // App package name for a native app banner. |
107 std::string native_app_package_; | 107 std::string native_app_package_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); | 109 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerAndroid); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace banners | 112 } // namespace banners |
113 | 113 |
114 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ | 114 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_ANDROID_H_ |
OLD | NEW |