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. |
Devlin
2015/08/04 16:05:07
"a background"? We should probably be more clear
afakhry
2015/08/04 18:31:08
background here means either view type of BACKGROU
| |
63 static const base::string16 PrefixRendererTitle(const base::string16& title, | 63 static const base::string16 PrefixRendererTitle(const base::string16& title, |
64 bool is_app, | 64 bool is_app, |
Devlin
2015/08/04 16:05:07
the fact that we have is_app and is_extension is w
afakhry
2015/08/04 18:31:08
I'm not sure I totally get your suggestion here. H
ncarter (slow)
2015/08/04 18:55:19
I think devlin means that "app && !extension" ough
afakhry
2015/08/04 19:02:25
I got it. We can definitely defer this to a later
| |
65 bool is_extension, | 65 bool is_extension, |
66 bool is_incognito); | 66 bool is_incognito, |
67 bool is_background); | |
67 | 68 |
68 content::WebContents* web_contents() const { return web_contents_; } | 69 content::WebContents* web_contents() const { return web_contents_; } |
69 | 70 |
70 private: | 71 private: |
71 // The WebContents of the task this object represents. | 72 // The WebContents of the task this object represents. |
72 content::WebContents* web_contents_; | 73 content::WebContents* web_contents_; |
73 | 74 |
74 // The render process host of the task this object represents. | 75 // The render process host of the task this object represents. |
75 content::RenderProcessHost* render_process_host_; | 76 content::RenderProcessHost* render_process_host_; |
76 | 77 |
(...skipping 15 matching lines...) Expand all Loading... | |
92 // The profile name associated with the browser context of the render view | 93 // The profile name associated with the browser context of the render view |
93 // host. | 94 // host. |
94 const base::string16 profile_name_; | 95 const base::string16 profile_name_; |
95 | 96 |
96 DISALLOW_COPY_AND_ASSIGN(RendererTask); | 97 DISALLOW_COPY_AND_ASSIGN(RendererTask); |
97 }; | 98 }; |
98 | 99 |
99 } // namespace task_management | 100 } // namespace task_management |
100 | 101 |
101 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H _ | 102 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_RENDERER_TASK_H _ |
OLD | NEW |