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_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_ |
6 #define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 const extensions::Extension* extension, | 27 const extensions::Extension* extension, |
28 extensions::ViewType view_type); | 28 extensions::ViewType view_type); |
29 ~ExtensionTask() override; | 29 ~ExtensionTask() override; |
30 | 30 |
31 // task_manager::RendererTask: | 31 // task_manager::RendererTask: |
32 void UpdateTitle() override; | 32 void UpdateTitle() override; |
33 void UpdateFavicon() override; | 33 void UpdateFavicon() override; |
34 void Activate() override; | 34 void Activate() override; |
35 Type GetType() const override; | 35 Type GetType() const override; |
36 | 36 |
| 37 int GetKeepaliveCount() const override; |
| 38 |
37 // extensions::IconImage::Observer | 39 // extensions::IconImage::Observer |
38 void OnExtensionIconImageChanged(extensions::IconImage* image) override; | 40 void OnExtensionIconImageChanged(extensions::IconImage* image) override; |
39 | 41 |
40 private: | 42 private: |
41 // If |extension| is nullptr, this method will get the title from | 43 // If |extension| is nullptr, this method will get the title from |
42 // the |web_contents|. | 44 // the |web_contents|. |
43 base::string16 GetExtensionTitle( | 45 base::string16 GetExtensionTitle( |
44 content::WebContents* web_contents, | 46 content::WebContents* web_contents, |
45 const extensions::Extension* extension, | 47 const extensions::Extension* extension, |
46 extensions::ViewType view_type) const; | 48 extensions::ViewType view_type) const; |
47 | 49 |
48 // This is called upon the creation of this task to load the extension icon | 50 // This is called upon the creation of this task to load the extension icon |
49 // for the first time if any. | 51 // for the first time if any. |
50 void LoadExtensionIcon(const extensions::Extension* extension); | 52 void LoadExtensionIcon(const extensions::Extension* extension); |
51 | 53 |
52 // The favicon of the extension represented by this task. | 54 // The favicon of the extension represented by this task. |
53 std::unique_ptr<extensions::IconImage> extension_icon_; | 55 std::unique_ptr<extensions::IconImage> extension_icon_; |
54 | 56 |
| 57 extensions::ViewType view_type_; |
| 58 |
55 DISALLOW_COPY_AND_ASSIGN(ExtensionTask); | 59 DISALLOW_COPY_AND_ASSIGN(ExtensionTask); |
56 }; | 60 }; |
57 | 61 |
58 } // namespace task_manager | 62 } // namespace task_manager |
59 | 63 |
60 #endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_ | 64 #endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TASK_H_ |
OLD | NEW |