| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 10 |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "chrome/browser/command_updater_delegate.h" | 12 #include "chrome/browser/command_updater_delegate.h" |
| 12 #include "chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h" | 13 #include "chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h" |
| 13 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 14 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 14 #include "components/security_state/security_state_model.h" | 15 #include "components/security_state/security_state_model.h" |
| 15 #include "content/public/browser/page_navigator.h" | 16 #include "content/public/browser/page_navigator.h" |
| 16 #include "content/public/browser/web_contents_delegate.h" | 17 #include "content/public/browser/web_contents_delegate.h" |
| 17 #include "ui/views/controls/button/image_button.h" | 18 #include "ui/views/controls/button/image_button.h" |
| 18 #include "ui/views/widget/widget_delegate.h" | 19 #include "ui/views/widget/widget_delegate.h" |
| 19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 20 | 21 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition) override; | 96 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition) override; |
| 96 | 97 |
| 97 private: | 98 private: |
| 98 friend class SimpleWebViewDialogTest; | 99 friend class SimpleWebViewDialogTest; |
| 99 | 100 |
| 100 void LoadImages(); | 101 void LoadImages(); |
| 101 void UpdateButtons(); | 102 void UpdateButtons(); |
| 102 void UpdateReload(bool is_loading, bool force); | 103 void UpdateReload(bool is_loading, bool force); |
| 103 | 104 |
| 104 Profile* profile_; | 105 Profile* profile_; |
| 105 scoped_ptr<ToolbarModel> toolbar_model_; | 106 std::unique_ptr<ToolbarModel> toolbar_model_; |
| 106 scoped_ptr<CommandUpdater> command_updater_; | 107 std::unique_ptr<CommandUpdater> command_updater_; |
| 107 | 108 |
| 108 // Controls | 109 // Controls |
| 109 views::ImageButton* back_; | 110 views::ImageButton* back_; |
| 110 views::ImageButton* forward_; | 111 views::ImageButton* forward_; |
| 111 ReloadButton* reload_; | 112 ReloadButton* reload_; |
| 112 LocationBarView* location_bar_; | 113 LocationBarView* location_bar_; |
| 113 views::WebView* web_view_; | 114 views::WebView* web_view_; |
| 114 | 115 |
| 115 // Contains |web_view_| while it isn't owned by the view. | 116 // Contains |web_view_| while it isn't owned by the view. |
| 116 scoped_ptr<views::WebView> web_view_container_; | 117 std::unique_ptr<views::WebView> web_view_container_; |
| 117 | 118 |
| 118 scoped_ptr<StubBubbleModelDelegate> bubble_model_delegate_; | 119 std::unique_ptr<StubBubbleModelDelegate> bubble_model_delegate_; |
| 119 | 120 |
| 120 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); | 121 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 } // namespace chromeos | 124 } // namespace chromeos |
| 124 | 125 |
| 125 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ | 126 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ |
| OLD | NEW |