OLD | NEW |
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 #include "chrome/browser/task_manager/extension_information.h" | 5 #include "chrome/browser/task_manager/extension_information.h" |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 namespace task_manager { | 44 namespace task_manager { |
45 | 45 |
46 class ExtensionProcessResource : public RendererResource { | 46 class ExtensionProcessResource : public RendererResource { |
47 public: | 47 public: |
48 explicit ExtensionProcessResource(const Extension* extension, | 48 explicit ExtensionProcessResource(const Extension* extension, |
49 content::RenderViewHost* render_view_host); | 49 content::RenderViewHost* render_view_host); |
50 virtual ~ExtensionProcessResource(); | 50 ~ExtensionProcessResource() override; |
51 | 51 |
52 // Resource methods: | 52 // Resource methods: |
53 virtual base::string16 GetTitle() const override; | 53 base::string16 GetTitle() const override; |
54 virtual gfx::ImageSkia GetIcon() const override; | 54 gfx::ImageSkia GetIcon() const override; |
55 virtual Type GetType() const override; | 55 Type GetType() const override; |
56 | 56 |
57 private: | 57 private: |
58 // Returns true if the associated extension has a background page. | 58 // Returns true if the associated extension has a background page. |
59 bool IsBackground() const; | 59 bool IsBackground() const; |
60 | 60 |
61 // The icon painted for the extension process. | 61 // The icon painted for the extension process. |
62 static gfx::ImageSkia* default_icon_; | 62 static gfx::ImageSkia* default_icon_; |
63 | 63 |
64 // Cached data about the extension. | 64 // Cached data about the extension. |
65 base::string16 title_; | 65 base::string16 title_; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 const Extension* extension = GetExtensionForWebContents(web_contents); | 172 const Extension* extension = GetExtensionForWebContents(web_contents); |
173 if (!extension) { | 173 if (!extension) { |
174 NOTREACHED(); | 174 NOTREACHED(); |
175 return scoped_ptr<RendererResource>(); | 175 return scoped_ptr<RendererResource>(); |
176 } | 176 } |
177 return scoped_ptr<RendererResource>(new ExtensionProcessResource( | 177 return scoped_ptr<RendererResource>(new ExtensionProcessResource( |
178 extension, web_contents->GetRenderViewHost())); | 178 extension, web_contents->GetRenderViewHost())); |
179 } | 179 } |
180 | 180 |
181 } // namespace task_manager | 181 } // namespace task_manager |
OLD | NEW |