Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: chrome/browser/chromeos/login/web_page_view.h

Issue 10204002: Revert 133467 - Convert the last users of DOMView to WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/timer.h" 12 #include "base/timer.h"
13 #include "ui/views/controls/webview/webview.h" 13 #include "chrome/browser/ui/views/dom_view.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 15
16 class Profile; 16 class Profile;
17 17
18 namespace content { 18 namespace content {
19 class BrowserContext;
20 class SiteInstance; 19 class SiteInstance;
21 class WebContentsDelegate; 20 class WebContentsDelegate;
22 } 21 }
23 22
24 namespace views { 23 namespace views {
25 class Label; 24 class Label;
26 class Throbber; 25 class Throbber;
27 } 26 }
28 27
29 namespace chromeos { 28 namespace chromeos {
30 29
31 // WebPageDomView is the view that is rendering the page. 30 // WebPageDomView is the view that is rendering the page.
32 class WebPageDomView : public views::WebView { 31 class WebPageDomView : public DOMView {
33 public: 32 public:
34 explicit WebPageDomView(content::BrowserContext* browser_context); 33 WebPageDomView() {}
35 34
36 // Set delegate that will be notified about tab contents changes. 35 // Set delegate that will be notified about tab contents changes.
37 void SetWebContentsDelegate(content::WebContentsDelegate* delegate); 36 void SetWebContentsDelegate(content::WebContentsDelegate* delegate);
38 37
39 private: 38 private:
40 DISALLOW_COPY_AND_ASSIGN(WebPageDomView); 39 DISALLOW_COPY_AND_ASSIGN(WebPageDomView);
41 }; 40 };
42 41
43 // WebPageView represents the view that holds WebPageDomView with 42 // WebPageView represents the view that holds WebPageDomView with
44 // page rendered in it. While page is loaded spinner overlay is shown. 43 // page rendered in it. While page is loaded spinner overlay is shown.
45 class WebPageView : public views::View { 44 class WebPageView : public views::View {
46 public: 45 public:
47 WebPageView(); 46 WebPageView();
48 virtual ~WebPageView(); 47 virtual ~WebPageView();
49 48
50 // Initialize view layout. 49 // Initialize view layout.
51 void Init(); 50 void Init();
52 51
53 // Initialize the WebView, creating the contents. This should be 52 // Initialize the DOM view, creating the contents. This should be
54 // called once the view has been added to a container. 53 // called once the view has been added to a container.
55 void InitWebView(content::SiteInstance* site_instance); 54 void InitDOM(Profile* profile, content::SiteInstance* site_instance);
56 55
57 // Loads the given URL into the page. 56 // Loads the given URL into the page.
58 // You must have previously called Init() and SetWebContentsDelegate. 57 // You must have previously called Init() and SetWebContentsDelegate.
59 void LoadURL(const GURL& url); 58 void LoadURL(const GURL& url);
60 59
61 // Sets delegate for tab contents changes. 60 // Sets delegate for tab contents changes.
62 void SetWebContentsDelegate(content::WebContentsDelegate* delegate); 61 void SetWebContentsDelegate(content::WebContentsDelegate* delegate);
63 62
64 // Stops throbber and shows page content (starts renderer_timer_ for that). 63 // Stops throbber and shows page content (starts renderer_timer_ for that).
65 void ShowPageContent(); 64 void ShowPageContent();
(...skipping 22 matching lines...) Expand all
88 87
89 // Timer used before toggling loaded page visibility. 88 // Timer used before toggling loaded page visibility.
90 base::OneShotTimer<WebPageView> stop_timer_; 89 base::OneShotTimer<WebPageView> stop_timer_;
91 90
92 DISALLOW_COPY_AND_ASSIGN(WebPageView); 91 DISALLOW_COPY_AND_ASSIGN(WebPageView);
93 }; 92 };
94 93
95 } // namespace chromeos 94 } // namespace chromeos
96 95
97 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_VIEW_H_ 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEB_PAGE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/registration_screen.cc ('k') | chrome/browser/chromeos/login/web_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698