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

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

Issue 1153813003: Add user_gesture param to WebContentsDelegate::ActivateContents Base URL: https://chromium.googlesource.com/chromium/src.git@ug1_WebContentsImpl_Activate
Patch Set: Update callers Created 5 years, 7 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 (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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 process.Terminate(content::RESULT_CODE_KILLED, false); 1488 process.Terminate(content::RESULT_CODE_KILLED, false);
1489 } 1489 }
1490 } 1490 }
1491 1491
1492 void TaskManager::ActivateProcess(int index) { 1492 void TaskManager::ActivateProcess(int index) {
1493 // GetResourceWebContents returns a pointer to the relevant web contents for 1493 // GetResourceWebContents returns a pointer to the relevant web contents for
1494 // the resource. If the index doesn't correspond to any web contents 1494 // the resource. If the index doesn't correspond to any web contents
1495 // (i.e. refers to the Browser process or a plugin), GetWebContents will 1495 // (i.e. refers to the Browser process or a plugin), GetWebContents will
1496 // return NULL. 1496 // return NULL.
1497 WebContents* chosen_web_contents = model_->GetResourceWebContents(index); 1497 WebContents* chosen_web_contents = model_->GetResourceWebContents(index);
1498 if (chosen_web_contents && chosen_web_contents->GetDelegate()) 1498 if (chosen_web_contents && chosen_web_contents->GetDelegate()) {
1499 chosen_web_contents->GetDelegate()->ActivateContents(chosen_web_contents); 1499 chosen_web_contents->GetDelegate()->ActivateContents(
1500 chosen_web_contents, true /* user_gesture */);
1501 }
1500 } 1502 }
1501 1503
1502 void TaskManager::AddResource(Resource* resource) { 1504 void TaskManager::AddResource(Resource* resource) {
1503 model_->AddResource(resource); 1505 model_->AddResource(resource);
1504 } 1506 }
1505 1507
1506 void TaskManager::RemoveResource(Resource* resource) { 1508 void TaskManager::RemoveResource(Resource* resource) {
1507 model_->RemoveResource(resource); 1509 model_->RemoveResource(resource);
1508 } 1510 }
1509 1511
(...skipping 26 matching lines...) Expand all
1536 params.host_desktop_type = desktop_type; 1538 params.host_desktop_type = desktop_type;
1537 chrome::Navigate(&params); 1539 chrome::Navigate(&params);
1538 } 1540 }
1539 1541
1540 TaskManager::TaskManager() 1542 TaskManager::TaskManager()
1541 : model_(new TaskManagerModel(this)) { 1543 : model_(new TaskManagerModel(this)) {
1542 } 1544 }
1543 1545
1544 TaskManager::~TaskManager() { 1546 TaskManager::~TaskManager() {
1545 } 1547 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698