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

Side by Side Diff: chrome/browser/infobars/infobar_responder.h

Issue 1100953002: Move InfoBarResponder into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace the notifications fork. Created 5 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_RESPONDER_H_
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_RESPONDER_H_
7
8 #include "components/infobars/core/infobar_manager.h"
9
10 namespace infobars {
11 class InfoBar;
12 }
13
14 class ConfirmInfoBarDelegate;
15 class InfoBarService;
16
17 // Accepts or rejects the first shown confirm infobar. The infobar will be
18 // handled asynchronously, to imitate the behavior of a real person. For use in
19 // tests.
Peter Kasting 2015/04/23 00:14:08 Nit: How about: Used by test code to asynchronous
Michael van Ouwerkerk 2015/04/23 13:36:09 Done.
20 class InfoBarResponder : public infobars::InfoBarManager::Observer {
21 public:
22 InfoBarResponder(InfoBarService* infobar_service, bool accept);
Peter Kasting 2015/04/23 00:14:08 Nit: Change name to |should_accept| (also the memb
Michael van Ouwerkerk 2015/04/23 13:36:09 Done.
23 ~InfoBarResponder() override;
24
25 // infobars::InfoBarManager::Observer
Peter Kasting 2015/04/23 00:14:08 Nit: Add trailing colon
Michael van Ouwerkerk 2015/04/23 13:36:09 Done.
26 void OnInfoBarAdded(infobars::InfoBar* infobar) override;
27
28 private:
29 void Respond(ConfirmInfoBarDelegate* delegate);
30
31 InfoBarService* infobar_service_;
32 bool accept_;
33 bool has_observed_;
Peter Kasting 2015/04/23 00:14:08 Nit: |infobar_seen_| might be slightly more descri
Michael van Ouwerkerk 2015/04/23 13:36:10 No longer needed.
34 };
Peter Kasting 2015/04/23 00:14:08 Nit: DISALLOW_COPY_AND_ASSIGN
Michael van Ouwerkerk 2015/04/23 13:36:10 Done.
35
36 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_RESPONDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/infobars/infobar_responder.cc » ('j') | chrome/browser/infobars/infobar_responder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698