Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/task_management/providers/web_contents/web_contents_task_provider.h

Issue 2183023005: TaskManager: unique_ptr<> ownership of TaskGroups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tm_default_selection
Patch Set: TaskManager: use containers of unique_ptrs instead of stl_util.h Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698