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

Side by Side Diff: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h

Issue 2244223002: Determine whether to show "Add to Homescreen" dialog or WebAPK infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_dialog_detector Created 4 years, 3 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 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_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Converts the icon into one that can be used on the Android Home screen. 49 // Converts the icon into one that can be used on the Android Home screen.
50 // |is_generated| is an out-param that indicates whether the icon was 50 // |is_generated| is an out-param that indicates whether the icon was
51 // generated by Chrome. 51 // generated by Chrome.
52 virtual SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon, 52 virtual SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon,
53 const GURL& url, 53 const GURL& url,
54 bool* is_generated) = 0; 54 bool* is_generated) = 0;
55 55
56 // Called when all the data needed to create a shortcut is available. 56 // Called when all the data needed to create a shortcut is available.
57 virtual void OnDataAvailable(const ShortcutInfo& info, 57 virtual void OnDataAvailable(const ShortcutInfo& info,
58 const SkBitmap& icon) = 0; 58 const SkBitmap& icon) = 0;
59
60 protected:
61 virtual ~Observer() {}
59 }; 62 };
60 63
61 // Initialize the fetcher by requesting the information about the page from 64 // Initialize the fetcher by requesting the information about the page from
62 // the renderer process. The initialization is asynchronous and 65 // the renderer process. The initialization is asynchronous and
63 // OnDidGetWebApplicationInfo is expected to be called when finished. 66 // OnDidGetWebApplicationInfo is expected to be called when finished.
64 AddToHomescreenDataFetcher(content::WebContents* web_contents, 67 AddToHomescreenDataFetcher(content::WebContents* web_contents,
65 int ideal_icon_size_in_dp, 68 int ideal_icon_size_in_dp,
66 int minimum_icon_size_in_dp, 69 int minimum_icon_size_in_dp,
67 int ideal_splash_image_size_in_dp, 70 int ideal_splash_image_size_in_dp,
68 int minimum_splash_image_size_in_dp, 71 int minimum_splash_image_size_in_dp,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const int ideal_splash_image_size_in_dp_; 127 const int ideal_splash_image_size_in_dp_;
125 const int minimum_splash_image_size_in_dp_; 128 const int minimum_splash_image_size_in_dp_;
126 bool is_waiting_for_web_application_info_; 129 bool is_waiting_for_web_application_info_;
127 bool is_icon_saved_; 130 bool is_icon_saved_;
128 bool is_ready_; 131 bool is_ready_;
129 132
130 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher); 133 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher);
131 }; 134 };
132 135
133 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ 136 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698