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

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

Issue 2741283002: Idea for AddToHomescreenDataFetcher tests
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/task/cancelable_task_tracker.h" 10 #include "base/task/cancelable_task_tracker.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 // Accessors, etc. 87 // Accessors, etc.
88 void set_weak_observer(Observer* observer) { weak_observer_ = observer; } 88 void set_weak_observer(Observer* observer) { weak_observer_ = observer; }
89 bool is_ready() const { return is_ready_; } 89 bool is_ready() const { return is_ready_; }
90 const SkBitmap& badge_icon() const { return badge_icon_; } 90 const SkBitmap& badge_icon() const { return badge_icon_; }
91 const SkBitmap& primary_icon() const { return primary_icon_; } 91 const SkBitmap& primary_icon() const { return primary_icon_; }
92 ShortcutInfo& shortcut_info() { return shortcut_info_; } 92 ShortcutInfo& shortcut_info() { return shortcut_info_; }
93 93
94 private: 94 private:
95 friend class base::RefCounted<AddToHomescreenDataFetcher>; 95 friend class base::RefCounted<AddToHomescreenDataFetcher>;
96 friend class AddToHomescreenDataFetcherTest;
96 97
97 ~AddToHomescreenDataFetcher() override; 98 ~AddToHomescreenDataFetcher() override;
98 99
99 // WebContentsObserver: 100 // WebContentsObserver:
100 bool OnMessageReceived(const IPC::Message& message) override; 101 bool OnMessageReceived(const IPC::Message& message) override;
101 102
102 // Called if either InstallableManager or the favicon fetch takes too long. 103 // Called if either InstallableManager or the favicon fetch takes too long.
103 void OnDataTimedout(); 104 void OnDataTimedout();
104 105
105 // Called when InstallableManager finishes looking for a manifest and icon. 106 // Called when InstallableManager finishes looking for a manifest and icon.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool check_webapk_compatibility_; 146 bool check_webapk_compatibility_;
146 bool is_waiting_for_web_application_info_; 147 bool is_waiting_for_web_application_info_;
147 bool is_installable_check_complete_; 148 bool is_installable_check_complete_;
148 bool is_icon_saved_; 149 bool is_icon_saved_;
149 bool is_ready_; 150 bool is_ready_;
150 151
151 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher); 152 DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcher);
152 }; 153 };
153 154
154 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_ 155 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_DATA_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698