OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "chrome/browser/chromeos/login/login_manager_test.h" | 8 #include "chrome/browser/chromeos/login/login_manager_test.h" |
9 #include "chrome/browser/chromeos/login/ui/captive_portal_view.h" | 9 #include "chrome/browser/chromeos/login/ui/captive_portal_view.h" |
10 #include "chrome/browser/chromeos/login/ui/captive_portal_window_proxy.h" | 10 #include "chrome/browser/chromeos/login/ui/captive_portal_window_proxy.h" |
11 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 11 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
12 #include "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h" | 12 #include "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h" |
13 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 13 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
14 #include "content/public/browser/interstitial_page.h" | 14 #include "content/public/browser/interstitial_page.h" |
15 #include "content/public/browser/interstitial_page_delegate.h" | 15 #include "content/public/browser/interstitial_page_delegate.h" |
16 #include "ui/views/controls/webview/webview.h" | 16 #include "ui/views/controls/webview/webview.h" |
17 | 17 |
18 namespace chromeos { | 18 namespace chromeos { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 class StubDelegate : public CaptivePortalWindowProxyDelegate { | 22 class StubDelegate : public CaptivePortalWindowProxyDelegate { |
23 public: | 23 public: |
24 StubDelegate() {} | 24 StubDelegate() {} |
25 virtual ~StubDelegate() {} | 25 virtual ~StubDelegate() {} |
26 virtual void OnPortalDetected() OVERRIDE {} | 26 virtual void OnPortalDetected() override {} |
27 | 27 |
28 private: | 28 private: |
29 DISALLOW_COPY_AND_ASSIGN(StubDelegate); | 29 DISALLOW_COPY_AND_ASSIGN(StubDelegate); |
30 }; | 30 }; |
31 | 31 |
32 class InterstitialPageDelegate : public content::InterstitialPageDelegate { | 32 class InterstitialPageDelegate : public content::InterstitialPageDelegate { |
33 public: | 33 public: |
34 explicit InterstitialPageDelegate(content::WebContents* web_contents) { | 34 explicit InterstitialPageDelegate(content::WebContents* web_contents) { |
35 content::InterstitialPage* page = content::InterstitialPage::Create( | 35 content::InterstitialPage* page = content::InterstitialPage::Create( |
36 web_contents, true, GURL("http://foo"), this); | 36 web_contents, true, GURL("http://foo"), this); |
37 page->Show(); | 37 page->Show(); |
38 } | 38 } |
39 | 39 |
40 virtual ~InterstitialPageDelegate() {} | 40 virtual ~InterstitialPageDelegate() {} |
41 | 41 |
42 private: | 42 private: |
43 // InterstitialPageDelegate implementation: | 43 // InterstitialPageDelegate implementation: |
44 virtual std::string GetHTMLContents() OVERRIDE { return "HTML Contents"; } | 44 virtual std::string GetHTMLContents() override { return "HTML Contents"; } |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(InterstitialPageDelegate); | 46 DISALLOW_COPY_AND_ASSIGN(InterstitialPageDelegate); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace | 49 } // namespace |
50 | 50 |
51 class SimpleWebViewDialogTest : public LoginManagerTest { | 51 class SimpleWebViewDialogTest : public LoginManagerTest { |
52 public: | 52 public: |
53 SimpleWebViewDialogTest(): LoginManagerTest(false) {} | 53 SimpleWebViewDialogTest(): LoginManagerTest(false) {} |
54 virtual ~SimpleWebViewDialogTest() {} | 54 virtual ~SimpleWebViewDialogTest() {} |
(...skipping 15 matching lines...) Expand all Loading... |
70 StubDelegate delegate; | 70 StubDelegate delegate; |
71 CaptivePortalWindowProxy proxy(&delegate, web_contents); | 71 CaptivePortalWindowProxy proxy(&delegate, web_contents); |
72 proxy.Show(); | 72 proxy.Show(); |
73 | 73 |
74 // Delegate creates a page and passes himself to it. Page owns the | 74 // Delegate creates a page and passes himself to it. Page owns the |
75 // delegate and will be destroyed by the end of the test. | 75 // delegate and will be destroyed by the end of the test. |
76 CreateDelegate(&proxy); | 76 CreateDelegate(&proxy); |
77 } | 77 } |
78 | 78 |
79 } // namespace chromeos | 79 } // namespace chromeos |
OLD | NEW |