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

Side by Side Diff: ceee/ie/broker/executors_manager.h

Issue 5595005: Revert 68298 - Make sure we don't keep tab id - handles mapping when a dread ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « ceee/ie/broker/chrome_postman.cc ('k') | ceee/ie/broker/executors_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // @file 5 // @file
6 // ExecutorsManager implementation, an object to keep track of the 6 // ExecutorsManager implementation, an object to keep track of the
7 // CeeeExecutor objects that were instantiated in destination threads. 7 // CeeeExecutor objects that were instantiated in destination threads.
8 8
9 #ifndef CEEE_IE_BROKER_EXECUTORS_MANAGER_H_ 9 #ifndef CEEE_IE_BROKER_EXECUTORS_MANAGER_H_
10 #define CEEE_IE_BROKER_EXECUTORS_MANAGER_H_ 10 #define CEEE_IE_BROKER_EXECUTORS_MANAGER_H_
11 11
12 #include <atlbase.h> 12 #include <atlbase.h>
13 #include <atlcom.h> 13 #include <atlcom.h>
14 #include <map> 14 #include <map>
15 #include <list> 15 #include <list>
16 16
17 #include "base/lock.h" 17 #include "base/lock.h"
18 #include "base/singleton.h" 18 #include "base/singleton.h"
19 #include "base/task.h"
20 #include "ceee/common/window_utils.h" 19 #include "ceee/common/window_utils.h"
21 #include "ceee/ie/broker/window_events_funnel.h" 20 #include "ceee/ie/broker/window_events_funnel.h"
22 21
23 #include "toolband.h" // NOLINT 22 #include "toolband.h" // NOLINT
24 23
25 // This class is to be used as a single instance for the broker module to 24 // This class is to be used as a single instance for the broker module to
26 // hold on a map of executor objects per thread that won't go away when 25 // hold on a map of executor objects per thread that won't go away when
27 // the instance of the Broker object does. 26 // the instance of the Broker object does.
28 // 27 //
29 // See the @ref ExecutorsManagerDoc page for more details. 28 // See the @ref ExecutorsManagerDoc page for more details.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // @return The corresponding HWND (or INVALID_HANDLE_VALUE if tool_band_id 113 // @return The corresponding HWND (or INVALID_HANDLE_VALUE if tool_band_id
115 // isn't found). 114 // isn't found).
116 virtual HWND GetTabHandleFromToolBandId(int tool_band_id); 115 virtual HWND GetTabHandleFromToolBandId(int tool_band_id);
117 116
118 // Register the relation between a tool band tab ID and an HWND. 117 // Register the relation between a tool band tab ID and an HWND.
119 virtual void SetTabToolBandIdForHandle(int tool_band_id, HWND tab_handle); 118 virtual void SetTabToolBandIdForHandle(int tool_band_id, HWND tab_handle);
120 119
121 // Unregister the HWND and its corresponding tab ID and tool band tab ID. 120 // Unregister the HWND and its corresponding tab ID and tool band tab ID.
122 virtual void DeleteTabHandle(HWND handle); 121 virtual void DeleteTabHandle(HWND handle);
123 122
124 // Cleans up the maps from all handles that would be associated to the given
125 // thread id.
126 virtual void CleanupMapsForThread(DWORD thread_id);
127
128 // Traits for Singleton<ExecutorsManager> so that we can pass an argument 123 // Traits for Singleton<ExecutorsManager> so that we can pass an argument
129 // to the constructor. 124 // to the constructor.
130 struct SingletonTraits : public DefaultSingletonTraits<ExecutorsManager> { 125 struct SingletonTraits : public DefaultSingletonTraits<ExecutorsManager> {
131 static ExecutorsManager* New() { 126 static ExecutorsManager* New() {
132 if (test_instance_) 127 if (test_instance_)
133 return test_instance_; 128 return test_instance_;
134 else 129 else
135 return new ExecutorsManager(false); // By default, we want a thread. 130 return new ExecutorsManager(false); // By default, we want a thread.
136 } 131 }
137 }; 132 };
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return windows_events_funnel_; 252 return windows_events_funnel_;
258 } 253 }
259 254
260 // Test seam too. 255 // Test seam too.
261 static ExecutorsManager* test_instance_; 256 static ExecutorsManager* test_instance_;
262 257
263 DISALLOW_COPY_AND_ASSIGN(ExecutorsManager); 258 DISALLOW_COPY_AND_ASSIGN(ExecutorsManager);
264 }; 259 };
265 260
266 #endif // CEEE_IE_BROKER_EXECUTORS_MANAGER_H_ 261 #endif // CEEE_IE_BROKER_EXECUTORS_MANAGER_H_
OLDNEW
« no previous file with comments | « ceee/ie/broker/chrome_postman.cc ('k') | ceee/ie/broker/executors_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698