OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 Resources resources_; | 317 Resources resources_; |
318 | 318 |
319 // A scoped container for notification registries. | 319 // A scoped container for notification registries. |
320 content::NotificationRegistrar registrar_; | 320 content::NotificationRegistrar registrar_; |
321 | 321 |
322 DISALLOW_COPY_AND_ASSIGN(TaskManagerBackgroundContentsResourceProvider); | 322 DISALLOW_COPY_AND_ASSIGN(TaskManagerBackgroundContentsResourceProvider); |
323 }; | 323 }; |
324 | 324 |
325 class TaskManagerChildProcessResource : public TaskManager::Resource { | 325 class TaskManagerChildProcessResource : public TaskManager::Resource { |
326 public: | 326 public: |
327 TaskManagerChildProcessResource(content::ProcessType type, | 327 TaskManagerChildProcessResource(int process_type, |
328 const string16& name, | 328 const string16& name, |
329 base::ProcessHandle handle, | 329 base::ProcessHandle handle, |
330 int unique_process_id); | 330 int unique_process_id); |
331 virtual ~TaskManagerChildProcessResource(); | 331 virtual ~TaskManagerChildProcessResource(); |
332 | 332 |
333 // TaskManager::Resource methods: | 333 // TaskManager::Resource methods: |
334 virtual string16 GetTitle() const OVERRIDE; | 334 virtual string16 GetTitle() const OVERRIDE; |
335 virtual string16 GetProfileName() const OVERRIDE; | 335 virtual string16 GetProfileName() const OVERRIDE; |
336 virtual gfx::ImageSkia GetIcon() const OVERRIDE; | 336 virtual gfx::ImageSkia GetIcon() const OVERRIDE; |
337 virtual base::ProcessHandle GetProcess() const OVERRIDE; | 337 virtual base::ProcessHandle GetProcess() const OVERRIDE; |
338 virtual int GetUniqueChildProcessId() const OVERRIDE; | 338 virtual int GetUniqueChildProcessId() const OVERRIDE; |
339 virtual Type GetType() const OVERRIDE; | 339 virtual Type GetType() const OVERRIDE; |
340 virtual bool SupportNetworkUsage() const OVERRIDE; | 340 virtual bool SupportNetworkUsage() const OVERRIDE; |
341 virtual void SetSupportNetworkUsage() OVERRIDE; | 341 virtual void SetSupportNetworkUsage() OVERRIDE; |
342 | 342 |
343 // Returns the pid of the child process. | 343 // Returns the pid of the child process. |
344 int process_id() const { return pid_; } | 344 int process_id() const { return pid_; } |
345 | 345 |
346 private: | 346 private: |
347 // Returns a localized title for the child process. For example, a plugin | 347 // Returns a localized title for the child process. For example, a plugin |
348 // process would be "Plug-in: Flash" when name is "Flash". | 348 // process would be "Plug-in: Flash" when name is "Flash". |
349 string16 GetLocalizedTitle() const; | 349 string16 GetLocalizedTitle() const; |
350 | 350 |
351 content::ProcessType type_; | 351 int process_type_; |
352 string16 name_; | 352 string16 name_; |
353 base::ProcessHandle handle_; | 353 base::ProcessHandle handle_; |
354 int pid_; | 354 int pid_; |
355 int unique_process_id_; | 355 int unique_process_id_; |
356 mutable string16 title_; | 356 mutable string16 title_; |
357 bool network_usage_support_; | 357 bool network_usage_support_; |
358 | 358 |
359 // The icon painted for the child processs. | 359 // The icon painted for the child processs. |
360 // TODO(jcampan): we should have plugin specific icons for well-known | 360 // TODO(jcampan): we should have plugin specific icons for well-known |
361 // plugins. | 361 // plugins. |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 TaskManagerGuestResource*> GuestResourceMap; | 680 TaskManagerGuestResource*> GuestResourceMap; |
681 GuestResourceMap resources_; | 681 GuestResourceMap resources_; |
682 | 682 |
683 // A scoped container for notification registries. | 683 // A scoped container for notification registries. |
684 content::NotificationRegistrar registrar_; | 684 content::NotificationRegistrar registrar_; |
685 | 685 |
686 DISALLOW_COPY_AND_ASSIGN(TaskManagerGuestResourceProvider); | 686 DISALLOW_COPY_AND_ASSIGN(TaskManagerGuestResourceProvider); |
687 }; | 687 }; |
688 | 688 |
689 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 689 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
OLD | NEW |