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

Side by Side Diff: chrome/browser/chromeos/login/ui/web_contents_forced_title.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
(Empty)
1 // Copyright 2016 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_CHROMEOS_LOGIN_UI_WEB_CONTENTS_FORCED_TITLE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_CONTENTS_FORCED_TITLE_H_
7
8 #include "base/strings/string16.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h"
11
12 namespace chromeos {
13
14 // Ensures that the title of the WebContents instance this object is attached
15 // to is always set to the given title value.
16 class WebContentsForcedTitle
17 : public content::WebContentsObserver,
18 public content::WebContentsUserData<WebContentsForcedTitle> {
19 public:
20 static void CreateForWebContentsWithTitle(content::WebContents* web_contents,
21 const base::string16& title);
22
23 ~WebContentsForcedTitle() override;
24
25 private:
26 WebContentsForcedTitle(content::WebContents* web_contents,
27 const base::string16& title);
28
29 // content::WebContentsObserver:
30 void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
31
32 base::string16 title_;
33
34 DISALLOW_COPY_AND_ASSIGN(WebContentsForcedTitle);
35 };
36
37 } // namespace chromeos
38
39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_CONTENTS_FORCED_TITLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/ui/web_contents_forced_title.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698