- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / webui / chromeos / mobile_setup_ui.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_ui_controller.h"
11
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.
14 class MobileSetupUI : public content::WebUIController,
15                       public content::WebContentsObserver,
16                       public base::SupportsWeakPtr<MobileSetupUI> {
17  public:
18   explicit MobileSetupUI(content::WebUI* web_ui);
19
20  private:
21   // content::WebContentsObserver overrides.
22   virtual void DidCommitProvisionalLoadForFrame(
23       int64 frame_id,
24       const string16& frame_unique_name,
25       bool is_main_frame,
26       const GURL& url,
27       content::PageTransition transition_type,
28       content::RenderViewHost* render_view_host) OVERRIDE;
29   virtual void DidFailProvisionalLoad(
30       int64 frame_id,
31       const string16& frame_unique_name,
32       bool is_main_frame,
33       const GURL& validated_url,
34       int error_code,
35       const string16& error_description,
36       content::RenderViewHost* render_view_host) OVERRIDE;
37
38   DISALLOW_COPY_AND_ASSIGN(MobileSetupUI);
39 };
40
41 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_UI_H_