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

Side by Side Diff: content/shell/webkit_test_controller.cc

Issue 11820009: Distinguish plugin disconnections from plugin crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 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
« no previous file with comments | « content/shell/webkit_test_controller.h ('k') | webkit/plugins/ppapi/plugin_delegate.h » ('j') | 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 "content/shell/webkit_test_controller.h" 5 #include "content/shell/webkit_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/stringprintf.h"
15 #include "content/public/browser/navigation_controller.h" 16 #include "content/public/browser/navigation_controller.h"
16 #include "content/public/browser/notification_service.h" 17 #include "content/public/browser/notification_service.h"
17 #include "content/public/browser/notification_types.h" 18 #include "content/public/browser/notification_types.h"
18 #include "content/public/browser/render_process_host.h" 19 #include "content/public/browser/render_process_host.h"
19 #include "content/public/browser/render_view_host.h" 20 #include "content/public/browser/render_view_host.h"
20 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
21 #include "content/shell/shell.h" 22 #include "content/shell/shell.h"
22 #include "content/shell/shell_browser_context.h" 23 #include "content/shell/shell_browser_context.h"
23 #include "content/shell/shell_content_browser_client.h" 24 #include "content/shell/shell_content_browser_client.h"
24 #include "content/shell/shell_messages.h" 25 #include "content/shell/shell_messages.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CanOpenWindows, OnCanOpenWindows) 260 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CanOpenWindows, OnCanOpenWindows)
260 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowWebInspector, OnShowWebInspector) 261 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowWebInspector, OnShowWebInspector)
261 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseWebInspector, OnCloseWebInspector) 262 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseWebInspector, OnCloseWebInspector)
262 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotImplemented, OnNotImplemented) 263 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotImplemented, OnNotImplemented)
263 IPC_MESSAGE_UNHANDLED(handled = false) 264 IPC_MESSAGE_UNHANDLED(handled = false)
264 IPC_END_MESSAGE_MAP() 265 IPC_END_MESSAGE_MAP()
265 266
266 return handled; 267 return handled;
267 } 268 }
268 269
269 void WebKitTestController::PluginCrashed(const FilePath& plugin_path) { 270 void WebKitTestController::PluginCrashed(const FilePath& plugin_path,
271 base::ProcessId plugin_pid) {
270 DCHECK(CalledOnValidThread()); 272 DCHECK(CalledOnValidThread());
271 printer_->AddErrorMessage("#CRASHED - plugin"); 273 printer_->AddErrorMessage(
274 base::StringPrintf("#CRASHED - plugin (pid %d)", plugin_pid));
272 } 275 }
273 276
274 void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) { 277 void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) {
275 DCHECK(CalledOnValidThread()); 278 DCHECK(CalledOnValidThread());
276 // Might be kNullProcessHandle, in which case we will receive a notification 279 // Might be kNullProcessHandle, in which case we will receive a notification
277 // later when the RenderProcessHost was created. 280 // later when the RenderProcessHost was created.
278 if (render_view_host->GetProcess()->GetHandle() != base::kNullProcessHandle) 281 if (render_view_host->GetProcess()->GetHandle() != base::kNullProcessHandle)
279 current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle()); 282 current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle());
280 render_view_host->Send(new ShellViewMsg_SetCurrentWorkingDirectory( 283 render_view_host->Send(new ShellViewMsg_SetCurrentWorkingDirectory(
281 render_view_host->GetRoutingID(), current_working_directory_)); 284 render_view_host->GetRoutingID(), current_working_directory_));
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 499
497 void WebKitTestController::OnNotImplemented( 500 void WebKitTestController::OnNotImplemented(
498 const std::string& object_name, 501 const std::string& object_name,
499 const std::string& property_name) { 502 const std::string& property_name) {
500 printer_->AddErrorMessage( 503 printer_->AddErrorMessage(
501 std::string("FAIL: NOT IMPLEMENTED: ") + 504 std::string("FAIL: NOT IMPLEMENTED: ") +
502 object_name + "." + property_name); 505 object_name + "." + property_name);
503 } 506 }
504 507
505 } // namespace content 508 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/webkit_test_controller.h ('k') | webkit/plugins/ppapi/plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698