Index: chrome/browser/ui/startup/chromedriver_infobar_delegate.h |
diff --git a/chrome/browser/ui/startup/chromedriver_infobar_delegate.h b/chrome/browser/ui/startup/chromedriver_infobar_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2cc85042b8d7600a4717b13536e0546745b33cde |
--- /dev/null |
+++ b/chrome/browser/ui/startup/chromedriver_infobar_delegate.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_STARTUP_CHROMEDRIVER_INFOBAR_DELEGATE_H_ |
+#define CHROME_BROWSER_UI_STARTUP_CHROMEDRIVER_INFOBAR_DELEGATE_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "base/macros.h" |
+#include "base/strings/string16.h" |
+#include "components/infobars/core/confirm_infobar_delegate.h" |
+#include "ui/gfx/vector_icons_public.h" |
+#include "url/gurl.h" |
+ |
+class Browser; |
+ |
+// An infobar to inform users if their browser is controlled by ChromeDriver. |
+class ChromeDriverInfoBarDelegate : public ConfirmInfoBarDelegate { |
+ public: |
+ ~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.
|
+ 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.
|
+ |
+ private: |
+ ChromeDriverInfoBarDelegate(); |
+ |
+ infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
+ base::string16 GetMessageText() const override; |
+ int GetButtons() const override; |
+ 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.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeDriverInfoBarDelegate); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_STARTUP_CHROMEDRIVER_INFOBAR_DELEGATE_H_ |