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

Side by Side Diff: chrome/browser/task_manager/task_manager.cc

Issue 415013002: Don't use WorkerResourceProvider if --disable-embedded-shared-worker is not set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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) 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 #include "chrome/browser/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/number_formatting.h" 8 #include "base/i18n/number_formatting.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/browser/ui/browser_navigator.h" 31 #include "chrome/browser/ui/browser_navigator.h"
32 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "components/nacl/browser/nacl_browser.h" 34 #include "components/nacl/browser/nacl_browser.h"
35 #include "content/public/browser/browser_thread.h" 35 #include "content/public/browser/browser_thread.h"
36 #include "content/public/browser/gpu_data_manager.h" 36 #include "content/public/browser/gpu_data_manager.h"
37 #include "content/public/browser/gpu_data_manager_observer.h" 37 #include "content/public/browser/gpu_data_manager_observer.h"
38 #include "content/public/browser/resource_request_info.h" 38 #include "content/public/browser/resource_request_info.h"
39 #include "content/public/browser/web_contents.h" 39 #include "content/public/browser/web_contents.h"
40 #include "content/public/browser/web_contents_delegate.h" 40 #include "content/public/browser/web_contents_delegate.h"
41 #include "content/public/browser/worker_service.h"
41 #include "content/public/common/result_codes.h" 42 #include "content/public/common/result_codes.h"
42 #include "extensions/browser/extension_system.h" 43 #include "extensions/browser/extension_system.h"
43 #include "grit/generated_resources.h" 44 #include "grit/generated_resources.h"
44 #include "grit/ui_resources.h" 45 #include "grit/ui_resources.h"
45 #include "third_party/icu/source/i18n/unicode/coll.h" 46 #include "third_party/icu/source/i18n/unicode/coll.h"
46 #include "ui/base/l10n/l10n_util.h" 47 #include "ui/base/l10n/l10n_util.h"
47 #include "ui/base/resource/resource_bundle.h" 48 #include "ui/base/resource/resource_bundle.h"
48 #include "ui/base/text/bytes_formatting.h" 49 #include "ui/base/text/bytes_formatting.h"
49 #include "ui/gfx/image/image_skia.h" 50 #include "ui/gfx/image/image_skia.h"
50 51
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 new task_manager::ChildProcessResourceProvider(task_manager)); 265 new task_manager::ChildProcessResourceProvider(task_manager));
265 AddResourceProvider(new task_manager::WebContentsResourceProvider( 266 AddResourceProvider(new task_manager::WebContentsResourceProvider(
266 task_manager, 267 task_manager,
267 scoped_ptr<WebContentsInformation>( 268 scoped_ptr<WebContentsInformation>(
268 new task_manager::ExtensionInformation()))); 269 new task_manager::ExtensionInformation())));
269 AddResourceProvider(new task_manager::WebContentsResourceProvider( 270 AddResourceProvider(new task_manager::WebContentsResourceProvider(
270 task_manager, 271 task_manager,
271 scoped_ptr<WebContentsInformation>( 272 scoped_ptr<WebContentsInformation>(
272 new task_manager::GuestInformation()))); 273 new task_manager::GuestInformation())));
273 274
274 AddResourceProvider(new task_manager::WorkerResourceProvider(task_manager)); 275 // We don't need to show the worker processes if "embedded-shared-worker" flag
276 // is enabled.
277 if (!content::WorkerService::EmbeddedSharedWorkerEnabled())
278 AddResourceProvider(new task_manager::WorkerResourceProvider(task_manager));
275 } 279 }
276 280
277 void TaskManagerModel::AddObserver(TaskManagerModelObserver* observer) { 281 void TaskManagerModel::AddObserver(TaskManagerModelObserver* observer) {
278 observer_list_.AddObserver(observer); 282 observer_list_.AddObserver(observer);
279 } 283 }
280 284
281 void TaskManagerModel::RemoveObserver(TaskManagerModelObserver* observer) { 285 void TaskManagerModel::RemoveObserver(TaskManagerModelObserver* observer) {
282 observer_list_.RemoveObserver(observer); 286 observer_list_.RemoveObserver(observer);
283 } 287 }
284 288
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 params.host_desktop_type = desktop_type; 1559 params.host_desktop_type = desktop_type;
1556 chrome::Navigate(&params); 1560 chrome::Navigate(&params);
1557 } 1561 }
1558 1562
1559 TaskManager::TaskManager() 1563 TaskManager::TaskManager()
1560 : model_(new TaskManagerModel(this)) { 1564 : model_(new TaskManagerModel(this)) {
1561 } 1565 }
1562 1566
1563 TaskManager::~TaskManager() { 1567 TaskManager::~TaskManager() {
1564 } 1568 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698