| 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_WEB_CONTENTS_TASK_
PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_WEB_CONTENTS_TASK_
PROVIDER_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_WEB_CONTENTS_TASK_
PROVIDER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_WEB_CONTENTS_TASK_
PROVIDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // task_management::TaskProvider: | 49 // task_management::TaskProvider: |
| 50 void StartUpdating() override; | 50 void StartUpdating() override; |
| 51 void StopUpdating() override; | 51 void StopUpdating() override; |
| 52 | 52 |
| 53 // Called when the given |web_contents| are destroyed so that we can delete | 53 // Called when the given |web_contents| are destroyed so that we can delete |
| 54 // its associated entry. | 54 // its associated entry. |
| 55 void DeleteEntry(content::WebContents* web_contents); | 55 void DeleteEntry(content::WebContents* web_contents); |
| 56 | 56 |
| 57 // A map to associate a |WebContents| with its corresponding entry that we | 57 // A map to associate a |WebContents| with its corresponding entry that we |
| 58 // create for it to be able to track it. | 58 // create for it to be able to track it. |
| 59 using EntryMap = std::map<content::WebContents*, WebContentsEntry*>; | 59 std::map<content::WebContents*, std::unique_ptr<WebContentsEntry>> |
| 60 EntryMap entries_map_; | 60 entries_map_; |
| 61 | 61 |
| 62 // True if this provider is listening to WebContentsTags and updating its | 62 // True if this provider is listening to WebContentsTags and updating its |
| 63 // observers, false otherwise. | 63 // observers, false otherwise. |
| 64 bool is_updating_; | 64 bool is_updating_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(WebContentsTaskProvider); | 66 DISALLOW_COPY_AND_ASSIGN(WebContentsTaskProvider); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace task_management | 69 } // namespace task_management |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_WEB_CONTENTS_TA
SK_PROVIDER_H_ | 71 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_WEB_CONTENTS_WEB_CONTENTS_TA
SK_PROVIDER_H_ |
| OLD | NEW |