OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ |
6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H_ |
7 | 7 |
8 #include "chrome/browser/task_management/providers/task.h" | 8 #include "chrome/browser/task_management/providers/task.h" |
9 #include "content/public/browser/navigation_entry.h" | 9 #include "content/public/browser/navigation_entry.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Returns the title of the given |web_contents|. | 52 // Returns the title of the given |web_contents|. |
53 static base::string16 GetTitleFromWebContents( | 53 static base::string16 GetTitleFromWebContents( |
54 content::WebContents* web_contents); | 54 content::WebContents* web_contents); |
55 | 55 |
56 // Returns the favicon of the given |web_contents| if any, and returns | 56 // Returns the favicon of the given |web_contents| if any, and returns |
57 // |nullptr| otherwise. | 57 // |nullptr| otherwise. |
58 static const gfx::ImageSkia* GetFaviconFromWebContents( | 58 static const gfx::ImageSkia* GetFaviconFromWebContents( |
59 content::WebContents* web_contents); | 59 content::WebContents* web_contents); |
60 | 60 |
61 // Prefixes the given renderer |title| with the appropriate string based on | 61 // Prefixes the given renderer |title| with the appropriate string based on |
62 // whether it's an app, an extension, or incognito. | 62 // whether it's an app, an extension, incognito or a background page or |
| 63 // contents. |
63 static const base::string16 PrefixRendererTitle(const base::string16& title, | 64 static const base::string16 PrefixRendererTitle(const base::string16& title, |
64 bool is_app, | 65 bool is_app, |
65 bool is_extension, | 66 bool is_extension, |
66 bool is_incognito); | 67 bool is_incognito, |
| 68 bool is_background); |
67 | 69 |
68 content::WebContents* web_contents() const { return web_contents_; } | 70 content::WebContents* web_contents() const { return web_contents_; } |
69 | 71 |
70 private: | 72 private: |
71 // The WebContents of the task this object represents. | 73 // The WebContents of the task this object represents. |
72 content::WebContents* web_contents_; | 74 content::WebContents* web_contents_; |
73 | 75 |
74 // The render process host of the task this object represents. | 76 // The render process host of the task this object represents. |
75 content::RenderProcessHost* render_process_host_; | 77 content::RenderProcessHost* render_process_host_; |
76 | 78 |
(...skipping 15 matching lines...) Expand all Loading... |
92 // The profile name associated with the browser context of the render view | 94 // The profile name associated with the browser context of the render view |
93 // host. | 95 // host. |
94 const base::string16 profile_name_; | 96 const base::string16 profile_name_; |
95 | 97 |
96 DISALLOW_COPY_AND_ASSIGN(RendererTask); | 98 DISALLOW_COPY_AND_ASSIGN(RendererTask); |
97 }; | 99 }; |
98 | 100 |
99 } // namespace task_management | 101 } // namespace task_management |
100 | 102 |
101 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H
_ | 103 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H
_ |
OLD | NEW |