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_handler.h" | 5 #include "chrome/browser/ui/webui/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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 model_->StartUpdating(); | 338 model_->StartUpdating(); |
339 | 339 |
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 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); | 347 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); |
348 if (rvh && rvh->delegate()) { | 348 if (rvh && rvh->GetDelegate()) { |
349 WebPreferences webkit_prefs = rvh->delegate()->GetWebkitPrefs(); | 349 WebPreferences webkit_prefs = rvh->GetDelegate()->GetWebkitPrefs(); |
350 webkit_prefs.allow_scripts_to_close_windows = true; | 350 webkit_prefs.allow_scripts_to_close_windows = true; |
351 rvh->UpdateWebkitPreferences(webkit_prefs); | 351 rvh->UpdateWebkitPreferences(webkit_prefs); |
352 } else { | 352 } else { |
353 DCHECK(false); | 353 DCHECK(false); |
354 } | 354 } |
355 | 355 |
356 task_manager_->OpenAboutMemory(); | 356 task_manager_->OpenAboutMemory(); |
357 } | 357 } |
358 | 358 |
359 void TaskManagerHandler::HandleSetUpdateColumn(const ListValue* args) { | 359 void TaskManagerHandler::HandleSetUpdateColumn(const ListValue* args) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 void TaskManagerHandler::OnGroupAdded(const int group_start, | 397 void TaskManagerHandler::OnGroupAdded(const int group_start, |
398 const int group_length) { | 398 const int group_length) { |
399 } | 399 } |
400 | 400 |
401 void TaskManagerHandler::OnGroupRemoved(const int group_start, | 401 void TaskManagerHandler::OnGroupRemoved(const int group_start, |
402 const int group_length) { | 402 const int group_length) { |
403 } | 403 } |
404 | 404 |
405 void TaskManagerHandler::OnReadyPeriodicalUpdate() { | 405 void TaskManagerHandler::OnReadyPeriodicalUpdate() { |
406 } | 406 } |
OLD | NEW |