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

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

Issue 8395042: [cros,de-hack] Get rid of singleton for the WebUILoginScreen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment nit Created 9 years, 1 month 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
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_WEBUI_LOGIN_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/login/login_html_dialog.h" 9 #include "chrome/browser/chromeos/login/login_html_dialog.h"
10 #include "chrome/browser/chromeos/status/status_area_host.h" 10 #include "chrome/browser/chromeos/status/status_area_host.h"
(...skipping 25 matching lines...) Expand all
36 public TabContentsDelegate, 36 public TabContentsDelegate,
37 public chromeos::LoginHtmlDialog::Delegate, 37 public chromeos::LoginHtmlDialog::Delegate,
38 public TabFirstRenderWatcher::Delegate { 38 public TabFirstRenderWatcher::Delegate {
39 public: 39 public:
40 static const int kStatusAreaCornerPadding; 40 static const int kStatusAreaCornerPadding;
41 41
42 WebUILoginView(); 42 WebUILoginView();
43 virtual ~WebUILoginView(); 43 virtual ~WebUILoginView();
44 44
45 // Initializes the webui login view. 45 // Initializes the webui login view.
46 virtual void Init(); 46 virtual void Init(views::Widget* login_window);
47 47
48 // Overridden from views::Views: 48 // Overridden from views::Views:
49 virtual bool AcceleratorPressed( 49 virtual bool AcceleratorPressed(
50 const views::Accelerator& accelerator) OVERRIDE; 50 const views::Accelerator& accelerator) OVERRIDE;
51 virtual std::string GetClassName() const OVERRIDE; 51 virtual std::string GetClassName() const OVERRIDE;
52 52
53 // Overridden from StatusAreaHost: 53 // Overridden from StatusAreaHost:
54 virtual gfx::NativeWindow GetNativeWindow() const; 54 virtual gfx::NativeWindow GetNativeWindow() const;
55 55
56 // Called when WebUI window is created. 56 // Called when WebUI window is created.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual void OnLocaleChanged() OVERRIDE; 92 virtual void OnLocaleChanged() OVERRIDE;
93 93
94 // TabFirstRenderWatcher::Delegate implementation. 94 // TabFirstRenderWatcher::Delegate implementation.
95 virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE; 95 virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE;
96 virtual void OnTabMainFrameLoaded() OVERRIDE; 96 virtual void OnTabMainFrameLoaded() OVERRIDE;
97 virtual void OnTabMainFrameFirstRender() OVERRIDE; 97 virtual void OnTabMainFrameFirstRender() OVERRIDE;
98 98
99 // Creates and adds the status area (separate window). 99 // Creates and adds the status area (separate window).
100 virtual void InitStatusArea(); 100 virtual void InitStatusArea();
101 101
102 // Get the views widget hosting this WebUILoginView.
103 virtual views::Widget* GetLoginWindow();
104
105 StatusAreaView* status_area_; 102 StatusAreaView* status_area_;
106 103
107 // DOMView for rendering a webpage as a webui login. 104 // DOMView for rendering a webpage as a webui login.
108 DOMView* webui_login_; 105 DOMView* webui_login_;
109 106
110 private: 107 private:
111 // Map type for the accelerator-to-identifier map. 108 // Map type for the accelerator-to-identifier map.
112 typedef std::map<views::Accelerator, std::string> AccelMap; 109 typedef std::map<views::Accelerator, std::string> AccelMap;
113 110
114 // Overridden from TabContentsDelegate. 111 // Overridden from TabContentsDelegate.
115 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; 112 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
116 virtual void HandleKeyboardEvent( 113 virtual void HandleKeyboardEvent(
117 const NativeWebKeyboardEvent& event) OVERRIDE; 114 const NativeWebKeyboardEvent& event) OVERRIDE;
118 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; 115 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE;
119 virtual bool TakeFocus(bool reverse) OVERRIDE; 116 virtual bool TakeFocus(bool reverse) OVERRIDE;
120 117
121 // Called when focus is returned from status area. 118 // Called when focus is returned from status area.
122 // |reverse| is true when focus is traversed backwards (using Shift-Tab). 119 // |reverse| is true when focus is traversed backwards (using Shift-Tab).
123 void ReturnFocus(bool reverse); 120 void ReturnFocus(bool reverse);
124 121
122 // Login window which shows the view.
123 views::Widget* login_window_;
124
125 // Window that contains status area. 125 // Window that contains status area.
126 // TODO(nkostylev): Temporary solution till we have 126 // TODO(nkostylev): Temporary solution till we have
127 // RenderWidgetHostViewViews working. 127 // RenderWidgetHostViewViews working.
128 views::Widget* status_window_; 128 views::Widget* status_window_;
129 129
130 // Converts keyboard events on the TabContents to accelerators. 130 // Converts keyboard events on the TabContents to accelerators.
131 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; 131 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
132 132
133 // Maps installed accelerators to OOBE webui accelerator identifiers. 133 // Maps installed accelerators to OOBE webui accelerator identifiers.
134 AccelMap accel_map_; 134 AccelMap accel_map_;
135 135
136 // Proxy settings dialog that can be invoked from network menu. 136 // Proxy settings dialog that can be invoked from network menu.
137 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; 137 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_;
138 138
139 // Watches webui_login_'s TabContents rendering. 139 // Watches webui_login_'s TabContents rendering.
140 scoped_ptr<TabFirstRenderWatcher> tab_watcher_; 140 scoped_ptr<TabFirstRenderWatcher> tab_watcher_;
141 141
142 // Whether the host window is frozen. 142 // Whether the host window is frozen.
143 bool host_window_frozen_; 143 bool host_window_frozen_;
144 144
145 // Caches StatusArea visibility setting before it has been initialized. 145 // Caches StatusArea visibility setting before it has been initialized.
146 bool status_area_visibility_on_init_; 146 bool status_area_visibility_on_init_;
147 147
148 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); 148 DISALLOW_COPY_AND_ASSIGN(WebUILoginView);
149 }; 149 };
150 150
151 } // namespace chromeos 151 } // namespace chromeos
152 152
153 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ 153 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_display_host.cc ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698