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

Side by Side Diff: content/browser/plugin_process_host.cc

Issue 10908078: Code to collect issue 97285 debugging info for crash reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase against r155094. Created 8 years, 3 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 "content/browser/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #if defined(OS_WIN) && !defined(USE_AURA) 7 #if defined(OS_WIN) && !defined(USE_AURA)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 14 matching lines...) Expand all
25 #include "content/browser/browser_child_process_host_impl.h" 25 #include "content/browser/browser_child_process_host_impl.h"
26 #include "content/browser/gpu/gpu_data_manager_impl.h" 26 #include "content/browser/gpu/gpu_data_manager_impl.h"
27 #include "content/browser/plugin_service_impl.h" 27 #include "content/browser/plugin_service_impl.h"
28 #include "content/common/child_process_host_impl.h" 28 #include "content/common/child_process_host_impl.h"
29 #include "content/common/plugin_messages.h" 29 #include "content/common/plugin_messages.h"
30 #include "content/common/resource_messages.h" 30 #include "content/common/resource_messages.h"
31 #include "content/public/browser/browser_thread.h" 31 #include "content/public/browser/browser_thread.h"
32 #include "content/public/browser/content_browser_client.h" 32 #include "content/public/browser/content_browser_client.h"
33 #include "content/public/browser/notification_types.h" 33 #include "content/public/browser/notification_types.h"
34 #include "content/public/browser/plugin_service.h" 34 #include "content/public/browser/plugin_service.h"
35 #include "content/public/common/content_debug_logging.h"
35 #include "content/public/common/content_switches.h" 36 #include "content/public/common/content_switches.h"
36 #include "content/public/common/process_type.h" 37 #include "content/public/common/process_type.h"
37 #include "ipc/ipc_switches.h" 38 #include "ipc/ipc_switches.h"
38 #include "ui/base/ui_base_switches.h" 39 #include "ui/base/ui_base_switches.h"
39 #include "ui/gfx/native_widget_types.h" 40 #include "ui/gfx/native_widget_types.h"
40 #include "ui/gl/gl_switches.h" 41 #include "ui/gl/gl_switches.h"
41 42
42 using content::BrowserThread; 43 using content::BrowserThread;
43 using content::ChildProcessData; 44 using content::ChildProcessData;
44 using content::ChildProcessHost; 45 using content::ChildProcessHost;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 #if defined(OS_MACOSX) 327 #if defined(OS_MACOSX)
327 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSelectWindow, 328 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSelectWindow,
328 OnPluginSelectWindow) 329 OnPluginSelectWindow)
329 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginShowWindow, 330 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginShowWindow,
330 OnPluginShowWindow) 331 OnPluginShowWindow)
331 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginHideWindow, 332 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginHideWindow,
332 OnPluginHideWindow) 333 OnPluginHideWindow)
333 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSetCursorVisibility, 334 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSetCursorVisibility,
334 OnPluginSetCursorVisibility) 335 OnPluginSetCursorVisibility)
335 #endif 336 #endif
337 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ContentDebugRecordMsg,
338 OnContentDebugRecordMsg)
339 IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ContentDebugGetMessages,
340 OnContentDebugGetMessages)
336 IPC_MESSAGE_UNHANDLED(handled = false) 341 IPC_MESSAGE_UNHANDLED(handled = false)
337 IPC_END_MESSAGE_MAP() 342 IPC_END_MESSAGE_MAP()
338 343
339 DCHECK(handled); 344 DCHECK(handled);
340 return handled; 345 return handled;
341 } 346 }
342 347
343 void PluginProcessHost::OnChannelConnected(int32 peer_pid) { 348 void PluginProcessHost::OnChannelConnected(int32 peer_pid) {
344 for (size_t i = 0; i < pending_requests_.size(); ++i) { 349 for (size_t i = 0; i < pending_requests_.size(); ++i) {
345 RequestPluginChannel(pending_requests_[i]); 350 RequestPluginChannel(pending_requests_[i]);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 452 }
448 453
449 void PluginProcessHost::OnChannelCreated( 454 void PluginProcessHost::OnChannelCreated(
450 const IPC::ChannelHandle& channel_handle) { 455 const IPC::ChannelHandle& channel_handle) {
451 Client* client = sent_requests_.front(); 456 Client* client = sent_requests_.front();
452 457
453 if (client) 458 if (client)
454 client->OnChannelOpened(channel_handle); 459 client->OnChannelOpened(channel_handle);
455 sent_requests_.pop_front(); 460 sent_requests_.pop_front();
456 } 461 }
462
463 // TODO(shess): Could this be annotated WRT the sending plugin?
464 void PluginProcessHost::OnContentDebugRecordMsg(int bug_id,
465 const std::string& msg) {
466 content::debug::RecordMsg(bug_id, msg);
467 }
468
469 void PluginProcessHost::OnContentDebugGetMessages(
470 int bug_id, bool* handled, std::vector<std::string>* msgs) {
471 *handled = content::debug::GetMessages(bug_id, msgs);
472 }
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698