OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_LOGIN_SIMPLE_WEB_VIEW_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIMPLE_WEB_VIEW_DIALOG_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIMPLE_WEB_VIEW_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIMPLE_WEB_VIEW_DIALOG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater_delegate.h" |
11 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h" | 11 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h" |
12 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 12 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
13 #include "content/public/browser/page_navigator.h" | 13 #include "content/public/browser/page_navigator.h" |
14 #include "content/public/browser/web_contents_delegate.h" | 14 #include "content/public/browser/web_contents_delegate.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "ui/views/controls/button/image_button.h" | 16 #include "ui/views/controls/button/image_button.h" |
17 #include "ui/views/widget/widget_delegate.h" | 17 #include "ui/views/widget/widget_delegate.h" |
18 | 18 |
| 19 class CommandUpdater; |
19 class Profile; | 20 class Profile; |
20 class ReloadButton; | 21 class ReloadButton; |
21 class ToolbarModel; | 22 class ToolbarModel; |
22 | 23 |
23 namespace views { | 24 namespace views { |
24 class WebView; | 25 class WebView; |
25 class Widget; | 26 class Widget; |
26 } | 27 } |
27 | 28 |
28 namespace chromeos { | 29 namespace chromeos { |
29 | 30 |
30 class StubBubbleModelDelegate; | 31 class StubBubbleModelDelegate; |
31 | 32 |
32 // View class which shows the light version of the toolbar and the web contents. | 33 // View class which shows the light version of the toolbar and the web contents. |
33 // Light version of the toolbar includes back, forward buttons and location | 34 // Light version of the toolbar includes back, forward buttons and location |
34 // bar. Location bar is shown in read only mode, because this view is designed | 35 // bar. Location bar is shown in read only mode, because this view is designed |
35 // to be used for sign in to captive portal on login screen (when Browser | 36 // to be used for sign in to captive portal on login screen (when Browser |
36 // isn't running). | 37 // isn't running). |
37 class SimpleWebViewDialog : public views::ButtonListener, | 38 class SimpleWebViewDialog : public views::ButtonListener, |
38 public views::WidgetDelegateView, | 39 public views::WidgetDelegateView, |
39 public LocationBarView::Delegate, | 40 public LocationBarView::Delegate, |
40 public ToolbarModelDelegate, | 41 public ToolbarModelDelegate, |
41 public CommandUpdater::CommandUpdaterDelegate, | 42 public CommandUpdaterDelegate, |
42 public content::PageNavigator, | 43 public content::PageNavigator, |
43 public content::WebContentsDelegate { | 44 public content::WebContentsDelegate { |
44 public: | 45 public: |
45 explicit SimpleWebViewDialog(Profile* profile); | 46 explicit SimpleWebViewDialog(Profile* profile); |
46 virtual ~SimpleWebViewDialog(); | 47 virtual ~SimpleWebViewDialog(); |
47 | 48 |
48 // Starts loading. | 49 // Starts loading. |
49 void StartLoad(const GURL& gurl); | 50 void StartLoad(const GURL& gurl); |
50 | 51 |
51 // Inits view. Should be attached to a Widget before call. | 52 // Inits view. Should be attached to a Widget before call. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 scoped_ptr<views::WebView> web_view_container_; | 113 scoped_ptr<views::WebView> web_view_container_; |
113 | 114 |
114 scoped_ptr<StubBubbleModelDelegate> bubble_model_delegate_; | 115 scoped_ptr<StubBubbleModelDelegate> bubble_model_delegate_; |
115 | 116 |
116 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); | 117 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); |
117 }; | 118 }; |
118 | 119 |
119 } // chromeos | 120 } // chromeos |
120 | 121 |
121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIMPLE_WEB_VIEW_DIALOG_H_ | 122 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIMPLE_WEB_VIEW_DIALOG_H_ |
OLD | NEW |