| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEB_PAGE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_SCREEN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 virtual ~WebPageScreen(); | 21 virtual ~WebPageScreen(); |
| 22 | 22 |
| 23 // Exits from the screen with the specified exit code. | 23 // Exits from the screen with the specified exit code. |
| 24 virtual void CloseScreen(ScreenObserver::ExitCodes code) = 0; | 24 virtual void CloseScreen(ScreenObserver::ExitCodes code) = 0; |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 // content::WebContentsDelegate implementation: | 27 // content::WebContentsDelegate implementation: |
| 28 virtual bool ShouldAddNavigationToHistory( | 28 virtual bool ShouldAddNavigationToHistory( |
| 29 const history::HistoryAddPageArgs& add_page_args, | 29 const history::HistoryAddPageArgs& add_page_args, |
| 30 content::NavigationType navigation_type) OVERRIDE; | 30 content::NavigationType navigation_type) OVERRIDE; |
| 31 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; | 31 virtual bool HandleContextMenu( |
| 32 const content::ContextMenuParams& params) OVERRIDE; |
| 32 | 33 |
| 33 // Called by |timeout_timer_|. Stops page fetching and closes screen. | 34 // Called by |timeout_timer_|. Stops page fetching and closes screen. |
| 34 virtual void OnNetworkTimeout(); | 35 virtual void OnNetworkTimeout(); |
| 35 | 36 |
| 36 // Start/stop timeout timer. | 37 // Start/stop timeout timer. |
| 37 void StartTimeoutTimer(); | 38 void StartTimeoutTimer(); |
| 38 void StopTimeoutTimer(); | 39 void StopTimeoutTimer(); |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 // Timer used for network response timeout. | 42 // Timer used for network response timeout. |
| 42 base::OneShotTimer<WebPageScreen> timeout_timer_; | 43 base::OneShotTimer<WebPageScreen> timeout_timer_; |
| 43 | 44 |
| 44 DISALLOW_COPY_AND_ASSIGN(WebPageScreen); | 45 DISALLOW_COPY_AND_ASSIGN(WebPageScreen); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace chromeos | 48 } // namespace chromeos |
| 48 | 49 |
| 49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_SCREEN_H_ | 50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_SCREEN_H_ |
| OLD | NEW |