Chromium Code Reviews| 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> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 | 154 |
| 155 // Records that a banner was shown. The |event_name| corresponds to the RAPPOR | 155 // Records that a banner was shown. The |event_name| corresponds to the RAPPOR |
| 156 // metric being recorded. | 156 // metric being recorded. |
| 157 void RecordDidShowBanner(const std::string& event_name); | 157 void RecordDidShowBanner(const std::string& event_name); |
| 158 | 158 |
| 159 // Logs an error message corresponding to |code| to the devtools console | 159 // Logs an error message corresponding to |code| to the devtools console |
| 160 // attached to |web_contents|. Does nothing if IsDebugMode() returns false. | 160 // attached to |web_contents|. Does nothing if IsDebugMode() returns false. |
| 161 void ReportStatus(content::WebContents* web_contents, | 161 void ReportStatus(content::WebContents* web_contents, |
| 162 InstallableStatusCode code); | 162 InstallableStatusCode code); |
| 163 | 163 |
| 164 // Resets the manager's state. | |
|
dominickn
2017/02/06 02:16:53
The comment should be:
"Resets all fetched data f
pkotwicz
2017/02/06 03:00:11
Done. I have also renamed the method to ResetCurre
| |
| 165 virtual void ResetData(); | |
| 166 | |
| 164 // Stops the banner pipeline, preventing any outstanding callbacks from | 167 // Stops the banner pipeline, preventing any outstanding callbacks from |
| 165 // running and resetting the manager state. This method is virtual to allow | 168 // running and resetting the manager state. This method is virtual to allow |
| 166 // tests to intercept it and verify correct behaviour. | 169 // tests to intercept it and verify correct behaviour. |
| 167 virtual void Stop(); | 170 virtual void Stop(); |
| 168 | 171 |
| 169 // Sends a message to the renderer that the page has met the requirements to | 172 // Sends a message to the renderer that the page has met the requirements to |
| 170 // show a banner. The page can respond to cancel the banner (and possibly | 173 // show a banner. The page can respond to cancel the banner (and possibly |
| 171 // display it later), or otherwise allow it to be shown. | 174 // display it later), or otherwise allow it to be shown. |
| 172 void SendBannerPromptRequest(); | 175 void SendBannerPromptRequest(); |
| 173 | 176 |
| (...skipping 103 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 | 280 // scoped to the WebContents which they are observing. This allows us to use |
| 278 // weak pointers for callbacks. | 281 // weak pointers for callbacks. |
| 279 base::WeakPtrFactory<AppBannerManager> weak_factory_; | 282 base::WeakPtrFactory<AppBannerManager> weak_factory_; |
| 280 | 283 |
| 281 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); | 284 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 } // namespace banners | 287 } // namespace banners |
| 285 | 288 |
| 286 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ | 289 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_MANAGER_H_ |
| OLD | NEW |