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

Side by Side Diff: chrome/browser/ui/webui/task_manager_handler.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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 | Annotate | Revision Log
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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.cc ('k') | chrome/browser/ui/webui/web_ui_test_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698