| 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 #include "chrome/browser/ui/webui/task_manager/task_manager_handler.h" | 5 #include "chrome/browser/ui/webui/task_manager/task_manager_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 content::NotificationService::current()->Notify( | 340 content::NotificationService::current()->Notify( |
| 341 chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY, | 341 chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY, |
| 342 content::Source<TaskManagerModel>(model_), | 342 content::Source<TaskManagerModel>(model_), |
| 343 content::NotificationService::NoDetails()); | 343 content::NotificationService::NoDetails()); |
| 344 } | 344 } |
| 345 | 345 |
| 346 void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) { | 346 void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) { |
| 347 content::RenderViewHost* rvh = | 347 content::RenderViewHost* rvh = |
| 348 web_ui()->GetWebContents()->GetRenderViewHost(); | 348 web_ui()->GetWebContents()->GetRenderViewHost(); |
| 349 if (rvh && rvh->GetDelegate()) { | 349 if (rvh && rvh->GetDelegate()) { |
| 350 WebPreferences webkit_prefs = rvh->GetDelegate()->GetWebkitPrefs(); | 350 webkit_glue::WebPreferences webkit_prefs = |
| 351 rvh->GetDelegate()->GetWebkitPrefs(); |
| 351 webkit_prefs.allow_scripts_to_close_windows = true; | 352 webkit_prefs.allow_scripts_to_close_windows = true; |
| 352 rvh->UpdateWebkitPreferences(webkit_prefs); | 353 rvh->UpdateWebkitPreferences(webkit_prefs); |
| 353 } else { | 354 } else { |
| 354 DCHECK(false); | 355 DCHECK(false); |
| 355 } | 356 } |
| 356 | 357 |
| 357 task_manager_->OpenAboutMemory(); | 358 task_manager_->OpenAboutMemory(); |
| 358 } | 359 } |
| 359 | 360 |
| 360 void TaskManagerHandler::HandleSetUpdateColumn(const ListValue* args) { | 361 void TaskManagerHandler::HandleSetUpdateColumn(const ListValue* args) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 void TaskManagerHandler::OnGroupAdded(const int group_start, | 399 void TaskManagerHandler::OnGroupAdded(const int group_start, |
| 399 const int group_length) { | 400 const int group_length) { |
| 400 } | 401 } |
| 401 | 402 |
| 402 void TaskManagerHandler::OnGroupRemoved(const int group_start, | 403 void TaskManagerHandler::OnGroupRemoved(const int group_start, |
| 403 const int group_length) { | 404 const int group_length) { |
| 404 } | 405 } |
| 405 | 406 |
| 406 void TaskManagerHandler::OnReadyPeriodicalUpdate() { | 407 void TaskManagerHandler::OnReadyPeriodicalUpdate() { |
| 407 } | 408 } |
| OLD | NEW |