Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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_UI_STARTUP_CHROMEDRIVER_INFOBAR_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_STARTUP_CHROMEDRIVER_INFOBAR_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "base/strings/string16.h" | |
| 11 #include "components/infobars/core/confirm_infobar_delegate.h" | |
| 12 #include "ui/gfx/vector_icons_public.h" | |
| 13 #include "url/gurl.h" | |
| 14 | |
| 15 class Browser; | |
| 16 | |
| 17 // An infobar to inform users if their browser is controlled by ChromeDriver. | |
| 18 class ChromeDriverInfoBarDelegate : public ConfirmInfoBarDelegate { | |
| 19 public: | |
| 20 ~ChromeDriverInfoBarDelegate() override; | |
|
Peter Kasting
2017/02/13 23:16:52
Nit: This should be private
samuong
2017/02/14 00:19:17
I get a compile error if I try to make it private:
Peter Kasting
2017/02/14 00:23:17
Declare that unique_ptr as a unique_ptr<ConfirmInf
samuong
2017/02/14 00:26:54
Ah right, done.
| |
| 21 static void CreateAndShow(Browser* browser); | |
|
Peter Kasting
2017/02/13 23:16:52
Nit: Name this Create() in keeping with other info
samuong
2017/02/14 00:19:17
Done.
| |
| 22 | |
| 23 private: | |
| 24 ChromeDriverInfoBarDelegate(); | |
| 25 | |
| 26 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | |
| 27 base::string16 GetMessageText() const override; | |
| 28 int GetButtons() const override; | |
| 29 bool ShouldExpire(const NavigationDetails& details) const override; | |
|
Peter Kasting
2017/02/13 23:16:52
Nit: ShouldExpire() goes just above GetMessageText
samuong
2017/02/14 00:19:17
Done. Did this in the .cc file too.
| |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(ChromeDriverInfoBarDelegate); | |
| 32 }; | |
| 33 | |
| 34 #endif // CHROME_BROWSER_UI_STARTUP_CHROMEDRIVER_INFOBAR_DELEGATE_H_ | |
| OLD | NEW |