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_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
10 #include "content/public/browser/web_ui_controller.h" | 10 #include "content/public/browser/web_ui_controller.h" |
11 | 11 |
12 // A custom WebUI that defines datasource for mobile setup registration page | 12 // A custom WebUI that defines datasource for mobile setup registration page |
13 // that is used in Chrome OS activate modem and perform plan subscription tasks. | 13 // that is used in Chrome OS activate modem and perform plan subscription tasks. |
14 class MobileSetupUI : public content::WebUIController, | 14 class MobileSetupUI : public content::WebUIController, |
15 public content::WebContentsObserver, | 15 public content::WebContentsObserver, |
16 public base::SupportsWeakPtr<MobileSetupUI> { | 16 public base::SupportsWeakPtr<MobileSetupUI> { |
17 public: | 17 public: |
18 explicit MobileSetupUI(content::WebUI* web_ui); | 18 explicit MobileSetupUI(content::WebUI* web_ui); |
19 | 19 |
20 private: | 20 private: |
21 // content::WebContentsObserver overrides. | 21 // content::WebContentsObserver overrides. |
22 virtual void DidCommitProvisionalLoadForFrame( | 22 void DidCommitProvisionalLoadForFrame( |
23 content::RenderFrameHost* render_frame_host, | 23 content::RenderFrameHost* render_frame_host, |
24 const GURL& url, | 24 const GURL& url, |
25 ui::PageTransition transition_type) override; | 25 ui::PageTransition transition_type) override; |
26 virtual void DidFailProvisionalLoad( | 26 void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, |
27 content::RenderFrameHost* render_frame_host, | 27 const GURL& validated_url, |
28 const GURL& validated_url, | 28 int error_code, |
29 int error_code, | 29 const base::string16& error_description) override; |
30 const base::string16& error_description) override; | |
31 | 30 |
32 DISALLOW_COPY_AND_ASSIGN(MobileSetupUI); | 31 DISALLOW_COPY_AND_ASSIGN(MobileSetupUI); |
33 }; | 32 }; |
34 | 33 |
35 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_ | 34 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_ |
OLD | NEW |