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

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

Issue 2905523004: Making answer card to behave like other results. (Closed)
Patch Set: Fixing build breakage. Created 3 years, 6 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
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_SET_BACKGROUND_COLOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_CONTENTS_SET_BACKGROUND_COLOR_H_
7
8 #include "content/public/browser/web_contents_observer.h"
9 #include "content/public/browser/web_contents_user_data.h"
10
11 // Defined in SkColor.h (32-bit ARGB color).
12 using SkColor = unsigned int;
13
14 namespace chromeos {
15
16 // Ensures that the background color of a given WebContents instance is always
17 // set to a given color value.
18 class WebContentsSetBackgroundColor
19 : public content::WebContentsObserver,
20 public content::WebContentsUserData<WebContentsSetBackgroundColor> {
21 public:
22 static void CreateForWebContentsWithColor(content::WebContents* web_contents,
23 SkColor color);
24
25 ~WebContentsSetBackgroundColor() override;
26
27 private:
28 WebContentsSetBackgroundColor(content::WebContents* web_contents,
29 SkColor color);
30
31 // content::WebContentsObserver:
32 void RenderViewReady() override;
33 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
34 void RenderViewHostChanged(content::RenderViewHost* old_host,
35 content::RenderViewHost* new_host) override;
36
37 SkColor color_;
38
39 DISALLOW_COPY_AND_ASSIGN(WebContentsSetBackgroundColor);
40 };
41
42 } // namespace chromeos
43
44 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_WEB_CONTENTS_SET_BACKGROUND_COLOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/ui/web_contents_set_background_color.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698