| 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 <string> | 8 #include <string> |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/command_updater_delegate.h" | 10 #include "chrome/browser/command_updater_delegate.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 explicit SimpleWebViewDialog(Profile* profile); | 46 explicit SimpleWebViewDialog(Profile* profile); |
| 47 virtual ~SimpleWebViewDialog(); | 47 virtual ~SimpleWebViewDialog(); |
| 48 | 48 |
| 49 // Starts loading. | 49 // Starts loading. |
| 50 void StartLoad(const GURL& gurl); | 50 void StartLoad(const GURL& gurl); |
| 51 | 51 |
| 52 // Inits view. Should be attached to a Widget before call. | 52 // Inits view. Should be attached to a Widget before call. |
| 53 void Init(); | 53 void Init(); |
| 54 | 54 |
| 55 // Overridden from views::View: | 55 // Overridden from views::View: |
| 56 virtual void Layout() OVERRIDE; | 56 virtual void Layout() override; |
| 57 | 57 |
| 58 // Overridden from views::WidgetDelegate: | 58 // Overridden from views::WidgetDelegate: |
| 59 virtual views::View* GetContentsView() OVERRIDE; | 59 virtual views::View* GetContentsView() override; |
| 60 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 60 virtual views::View* GetInitiallyFocusedView() override; |
| 61 | 61 |
| 62 // Implements views::ButtonListener: | 62 // Implements views::ButtonListener: |
| 63 virtual void ButtonPressed(views::Button* sender, | 63 virtual void ButtonPressed(views::Button* sender, |
| 64 const ui::Event& event) OVERRIDE; | 64 const ui::Event& event) override; |
| 65 | 65 |
| 66 // Implements content::PageNavigator: | 66 // Implements content::PageNavigator: |
| 67 virtual content::WebContents* OpenURL( | 67 virtual content::WebContents* OpenURL( |
| 68 const content::OpenURLParams& params) OVERRIDE; | 68 const content::OpenURLParams& params) override; |
| 69 | 69 |
| 70 // Implements content::WebContentsDelegate: | 70 // Implements content::WebContentsDelegate: |
| 71 virtual void NavigationStateChanged( | 71 virtual void NavigationStateChanged( |
| 72 const content::WebContents* source, | 72 const content::WebContents* source, |
| 73 content::InvalidateTypes changed_flags) OVERRIDE; | 73 content::InvalidateTypes changed_flags) override; |
| 74 virtual void LoadingStateChanged(content::WebContents* source, | 74 virtual void LoadingStateChanged(content::WebContents* source, |
| 75 bool to_different_document) OVERRIDE; | 75 bool to_different_document) override; |
| 76 | 76 |
| 77 // Implements LocationBarView::Delegate: | 77 // Implements LocationBarView::Delegate: |
| 78 virtual content::WebContents* GetWebContents() OVERRIDE; | 78 virtual content::WebContents* GetWebContents() override; |
| 79 virtual ToolbarModel* GetToolbarModel() OVERRIDE; | 79 virtual ToolbarModel* GetToolbarModel() override; |
| 80 virtual const ToolbarModel* GetToolbarModel() const OVERRIDE; | 80 virtual const ToolbarModel* GetToolbarModel() const override; |
| 81 virtual InstantController* GetInstant() OVERRIDE; | 81 virtual InstantController* GetInstant() override; |
| 82 virtual views::Widget* CreateViewsBubble( | 82 virtual views::Widget* CreateViewsBubble( |
| 83 views::BubbleDelegateView* bubble_delegate) OVERRIDE; | 83 views::BubbleDelegateView* bubble_delegate) override; |
| 84 virtual PageActionImageView* CreatePageActionImageView( | 84 virtual PageActionImageView* CreatePageActionImageView( |
| 85 LocationBarView* owner, | 85 LocationBarView* owner, |
| 86 ExtensionAction* action) OVERRIDE; | 86 ExtensionAction* action) override; |
| 87 virtual ContentSettingBubbleModelDelegate* | 87 virtual ContentSettingBubbleModelDelegate* |
| 88 GetContentSettingBubbleModelDelegate() OVERRIDE; | 88 GetContentSettingBubbleModelDelegate() override; |
| 89 virtual void ShowWebsiteSettings(content::WebContents* web_contents, | 89 virtual void ShowWebsiteSettings(content::WebContents* web_contents, |
| 90 const GURL& url, | 90 const GURL& url, |
| 91 const content::SSLStatus& ssl) OVERRIDE; | 91 const content::SSLStatus& ssl) override; |
| 92 | 92 |
| 93 // Implements ToolbarModelDelegate: | 93 // Implements ToolbarModelDelegate: |
| 94 virtual content::WebContents* GetActiveWebContents() const OVERRIDE; | 94 virtual content::WebContents* GetActiveWebContents() const override; |
| 95 virtual bool InTabbedBrowser() const OVERRIDE; | 95 virtual bool InTabbedBrowser() const override; |
| 96 | 96 |
| 97 // Implements CommandUpdaterDelegate: | 97 // Implements CommandUpdaterDelegate: |
| 98 virtual void ExecuteCommandWithDisposition( | 98 virtual void ExecuteCommandWithDisposition( |
| 99 int id, | 99 int id, |
| 100 WindowOpenDisposition) OVERRIDE; | 100 WindowOpenDisposition) override; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 friend class SimpleWebViewDialogTest; | 103 friend class SimpleWebViewDialogTest; |
| 104 | 104 |
| 105 void LoadImages(); | 105 void LoadImages(); |
| 106 void UpdateButtons(); | 106 void UpdateButtons(); |
| 107 void UpdateReload(bool is_loading, bool force); | 107 void UpdateReload(bool is_loading, bool force); |
| 108 | 108 |
| 109 Profile* profile_; | 109 Profile* profile_; |
| 110 scoped_ptr<ToolbarModel> toolbar_model_; | 110 scoped_ptr<ToolbarModel> toolbar_model_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 121 scoped_ptr<views::WebView> web_view_container_; | 121 scoped_ptr<views::WebView> web_view_container_; |
| 122 | 122 |
| 123 scoped_ptr<StubBubbleModelDelegate> bubble_model_delegate_; | 123 scoped_ptr<StubBubbleModelDelegate> bubble_model_delegate_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); | 125 DISALLOW_COPY_AND_ASSIGN(SimpleWebViewDialog); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace chromeos | 128 } // namespace chromeos |
| 129 | 129 |
| 130 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ | 130 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_SIMPLE_WEB_VIEW_DIALOG_H_ |
| OLD | NEW |