| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition) override; | 98 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition) override; |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 friend class SimpleWebViewDialogTest; | 101 friend class SimpleWebViewDialogTest; |
| 101 | 102 |
| 102 void LoadImages(); | 103 void LoadImages(); |
| 103 void UpdateButtons(); | 104 void UpdateButtons(); |
| 104 void UpdateReload(bool is_loading, bool force); | 105 void UpdateReload(bool is_loading, bool force); |
| 105 | 106 |
| 106 Profile* profile_; | 107 Profile* profile_; |
| 107 scoped_ptr<ToolbarModel> toolbar_model_; | 108 std::unique_ptr<ToolbarModel> toolbar_model_; |
| 108 scoped_ptr<CommandUpdater> command_updater_; | 109 std::unique_ptr<CommandUpdater> command_updater_; |
| 109 | 110 |
| 110 // Controls | 111 // Controls |
| 111 views::ImageButton* back_; | 112 views::ImageButton* back_; |
| 112 views::ImageButton* forward_; | 113 views::ImageButton* forward_; |
| 113 ReloadButton* reload_; | 114 ReloadButton* reload_; |
| 114 LocationBarView* location_bar_; | 115 LocationBarView* location_bar_; |
| 115 views::WebView* web_view_; | 116 views::WebView* web_view_; |
| 116 | 117 |
| 117 // Contains |web_view_| while it isn't owned by the view. | 118 // Contains |web_view_| while it isn't owned by the view. |
| 118 scoped_ptr<views::WebView> web_view_container_; | 119 std::unique_ptr<views::WebView> web_view_container_; |
| 119 | 120 |
| 120 scoped_ptr<StubBubbleModelDelegate> bubble_model_delegate_; | 121 std::unique_ptr<StubBubbleModelDelegate> bubble_model_delegate_; |
| 121 | 122 |
| 122 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); | 123 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 } // namespace chromeos | 126 } // namespace chromeos |
| 126 | 127 |
| 127 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ | 128 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ |
| OLD | NEW |