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

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

Issue 2550263002: cros: Ensure task manager shows correct title for lock screen webview (Closed)
Patch Set: Rebase Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_WEBUI_LOGIN_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 29 matching lines...) Expand all
40 // WebUI based start up and lock screens. It contains a WebView. 40 // WebUI based start up and lock screens. It contains a WebView.
41 class WebUILoginView : public views::View, 41 class WebUILoginView : public views::View,
42 public content::WebContentsDelegate, 42 public content::WebContentsDelegate,
43 public content::NotificationObserver, 43 public content::NotificationObserver,
44 public ChromeWebModalDialogManagerDelegate, 44 public ChromeWebModalDialogManagerDelegate,
45 public web_modal::WebContentsModalDialogHost { 45 public web_modal::WebContentsModalDialogHost {
46 public: 46 public:
47 struct WebViewSettings { 47 struct WebViewSettings {
48 // URL of the WebView to preload and reuse across WebUILoginView instances. 48 // URL of the WebView to preload and reuse across WebUILoginView instances.
49 GURL preloaded_url; 49 GURL preloaded_url;
50
51 // Title of the web contents. This will be shown in the task manager. If
52 // empty, the default webview title will be used.
53 base::string16 web_view_title;
50 }; 54 };
51 55
52 // Internal class name. 56 // Internal class name.
53 static const char kViewClassName[]; 57 static const char kViewClassName[];
54 58
55 explicit WebUILoginView(const WebViewSettings& settings); 59 explicit WebUILoginView(const WebViewSettings& settings);
56 ~WebUILoginView() override; 60 ~WebUILoginView() override;
57 61
58 // Initializes the webui login view. 62 // Initializes the webui login view.
59 virtual void Init(); 63 virtual void Init();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void set_is_hidden(bool hidden) { is_hidden_ = hidden; } 108 void set_is_hidden(bool hidden) { is_hidden_ = hidden; }
105 109
106 bool webui_visible() const { return webui_visible_; } 110 bool webui_visible() const { return webui_visible_; }
107 111
108 // Let suppress emission of this signal. 112 // Let suppress emission of this signal.
109 void set_should_emit_login_prompt_visible(bool emit) { 113 void set_should_emit_login_prompt_visible(bool emit) {
110 should_emit_login_prompt_visible_ = emit; 114 should_emit_login_prompt_visible_ = emit;
111 } 115 }
112 116
113 protected: 117 protected:
114 static void InitializeWebView(views::WebView* web_view); 118 static void InitializeWebView(views::WebView* web_view,
119 const base::string16& title);
115 120
116 // Overridden from views::View: 121 // Overridden from views::View:
117 void Layout() override; 122 void Layout() override;
118 void OnLocaleChanged() override; 123 void OnLocaleChanged() override;
119 void ChildPreferredSizeChanged(View* child) override; 124 void ChildPreferredSizeChanged(View* child) override;
120 void AboutToRequestFocusFromTabTraversal(bool reverse) override; 125 void AboutToRequestFocusFromTabTraversal(bool reverse) override;
121 126
122 // Overridden from content::NotificationObserver. 127 // Overridden from content::NotificationObserver.
123 void Observe(int type, 128 void Observe(int type,
124 const content::NotificationSource& source, 129 const content::NotificationSource& source,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 std::unique_ptr<CycleFocusTraversable> cycle_focus_traversable_; 200 std::unique_ptr<CycleFocusTraversable> cycle_focus_traversable_;
196 201
197 base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_; 202 base::ObserverList<web_modal::ModalDialogHostObserver> observer_list_;
198 203
199 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); 204 DISALLOW_COPY_AND_ASSIGN(WebUILoginView);
200 }; 205 };
201 206
202 } // namespace chromeos 207 } // namespace chromeos
203 208
204 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_ 209 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEBUI_LOGIN_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/web_contents_forced_title.cc ('k') | chrome/browser/chromeos/login/ui/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698