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_BANNERS_APP_BANNER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ |
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ | 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ |
7 | 7 |
8 #include <memory> | |
9 #include <vector> | 8 #include <vector> |
10 | 9 |
11 #include "base/macros.h" | 10 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
13 #include "chrome/browser/engagement/site_engagement_observer.h" | 12 #include "chrome/browser/engagement/site_engagement_observer.h" |
14 #include "chrome/browser/installable/installable_logging.h" | 13 #include "chrome/browser/installable/installable_logging.h" |
15 #include "chrome/browser/installable/installable_manager.h" | 14 #include "chrome/browser/installable/installable_manager.h" |
16 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
17 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
18 #include "third_party/WebKit/public/platform/modules/app_banner/app_banner.mojom
.h" | 17 #include "third_party/WebKit/public/platform/modules/app_banner/app_banner.mojom
.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // The URL of the manifest. | 201 // The URL of the manifest. |
203 GURL manifest_url_; | 202 GURL manifest_url_; |
204 | 203 |
205 // The manifest object. | 204 // The manifest object. |
206 content::Manifest manifest_; | 205 content::Manifest manifest_; |
207 | 206 |
208 // The URL of the primary icon. | 207 // The URL of the primary icon. |
209 GURL primary_icon_url_; | 208 GURL primary_icon_url_; |
210 | 209 |
211 // The primary icon object. | 210 // The primary icon object. |
212 std::unique_ptr<SkBitmap> primary_icon_; | 211 SkBitmap primary_icon_; |
213 | 212 |
214 // The referrer string (if any) specified in the app URL. Used only for native | 213 // The referrer string (if any) specified in the app URL. Used only for native |
215 // app banners. | 214 // app banners. |
216 std::string referrer_; | 215 std::string referrer_; |
217 | 216 |
218 private: | 217 private: |
219 friend class AppBannerManagerTest; | 218 friend class AppBannerManagerTest; |
220 | 219 |
221 // Record that the banner could be shown at this point, if the triggering | 220 // Record that the banner could be shown at this point, if the triggering |
222 // heuristic allowed. | 221 // heuristic allowed. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // scoped to the WebContents which they are observing. This allows us to use | 276 // scoped to the WebContents which they are observing. This allows us to use |
278 // weak pointers for callbacks. | 277 // weak pointers for callbacks. |
279 base::WeakPtrFactory<AppBannerManager> weak_factory_; | 278 base::WeakPtrFactory<AppBannerManager> weak_factory_; |
280 | 279 |
281 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); | 280 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); |
282 }; | 281 }; |
283 | 282 |
284 } // namespace banners | 283 } // namespace banners |
285 | 284 |
286 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ | 285 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ |
OLD | NEW |