| 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/background_information.h" | 5 #include "chrome/browser/task_manager/background_information.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/background/background_contents_service.h" | 10 #include "chrome/browser/background/background_contents_service.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 using content::RenderViewHost; | 35 using content::RenderViewHost; |
| 36 using content::WebContents; | 36 using content::WebContents; |
| 37 using extensions::Extension; | 37 using extensions::Extension; |
| 38 | 38 |
| 39 namespace task_manager { | 39 namespace task_manager { |
| 40 | 40 |
| 41 class BackgroundContentsResource : public RendererResource { | 41 class BackgroundContentsResource : public RendererResource { |
| 42 public: | 42 public: |
| 43 BackgroundContentsResource(BackgroundContents* background_contents, | 43 BackgroundContentsResource(BackgroundContents* background_contents, |
| 44 const base::string16& application_name); | 44 const base::string16& application_name); |
| 45 virtual ~BackgroundContentsResource(); | 45 ~BackgroundContentsResource() override; |
| 46 | 46 |
| 47 // Resource methods: | 47 // Resource methods: |
| 48 virtual base::string16 GetTitle() const override; | 48 base::string16 GetTitle() const override; |
| 49 virtual gfx::ImageSkia GetIcon() const override; | 49 gfx::ImageSkia GetIcon() const override; |
| 50 | 50 |
| 51 const base::string16& application_name() const { return application_name_; } | 51 const base::string16& application_name() const { return application_name_; } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 BackgroundContents* background_contents_; | 54 BackgroundContents* background_contents_; |
| 55 | 55 |
| 56 base::string16 application_name_; | 56 base::string16 application_name_; |
| 57 | 57 |
| 58 // The icon painted for BackgroundContents. | 58 // The icon painted for BackgroundContents. |
| 59 // TODO(atwilson): Use the favicon when there's a way to get the favicon for | 59 // TODO(atwilson): Use the favicon when there's a way to get the favicon for |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 application_name = base::UTF8ToUTF16(extension->name()); | 164 application_name = base::UTF8ToUTF16(extension->name()); |
| 165 return scoped_ptr<RendererResource>( | 165 return scoped_ptr<RendererResource>( |
| 166 new BackgroundContentsResource(*iterator, application_name)); | 166 new BackgroundContentsResource(*iterator, application_name)); |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 NOTREACHED(); | 169 NOTREACHED(); |
| 170 return scoped_ptr<RendererResource>(); | 170 return scoped_ptr<RendererResource>(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace task_manager | 173 } // namespace task_manager |
| OLD | NEW |