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_TAG_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TAG_H_ |
6 #define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TAG_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TAG_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/task_manager/providers/web_contents/extension_task.h" | 9 #include "chrome/browser/task_manager/providers/web_contents/extension_task.h" |
10 #include "chrome/browser/task_manager/providers/web_contents/web_contents_tag.h" | 10 #include "chrome/browser/task_manager/providers/web_contents/web_contents_tag.h" |
11 | 11 |
12 namespace extensions { | |
13 class Extension; | |
14 } // namespace extensions | |
15 | |
16 namespace task_manager { | 12 namespace task_manager { |
17 | 13 |
18 // Defines a concrete UserData type for WebContents owned by extensions. | 14 // Defines a concrete UserData type for WebContents owned by extensions. |
19 class ExtensionTag : public WebContentsTag { | 15 class ExtensionTag : public WebContentsTag { |
20 public: | 16 public: |
21 // task_manager::WebContentsTag: | 17 // task_manager::WebContentsTag: |
22 ExtensionTask* CreateTask() const override; | 18 ExtensionTask* CreateTask() const override; |
23 | 19 |
24 private: | 20 private: |
25 friend class WebContentsTags; | 21 friend class WebContentsTags; |
26 | 22 |
27 ExtensionTag(content::WebContents* web_contents, | 23 ExtensionTag(content::WebContents* web_contents, |
28 const extensions::ViewType view_type); | 24 const extensions::ViewType view_type); |
29 ~ExtensionTag() override; | 25 ~ExtensionTag() override; |
30 | 26 |
31 // The ViewType of the extension WebContents this tag is attached to. | 27 // The ViewType of the extension WebContents this tag is attached to. |
32 const extensions::ViewType view_type_; | 28 const extensions::ViewType view_type_; |
33 | 29 |
34 DISALLOW_COPY_AND_ASSIGN(ExtensionTag); | 30 DISALLOW_COPY_AND_ASSIGN(ExtensionTag); |
35 }; | 31 }; |
36 | 32 |
37 } // namespace task_manager | 33 } // namespace task_manager |
38 | 34 |
39 #endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TAG_H_ | 35 #endif // CHROME_BROWSER_TASK_MANAGER_PROVIDERS_WEB_CONTENTS_EXTENSION_TAG_H_ |
OLD | NEW |