diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
commit | bfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch) | |
tree | 70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/plugin_process_host.cc | |
parent | a814d863440f0a154a7299f2d8b440f405c7700e (diff) | |
download | chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2 |
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the
notification service to derive from the notification observer. This splits that
out, so much less of the project should end up including notification_types.h
---Paths modified but not in any changelist:
Review URL: http://codereview.chromium.org/19744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r-- | chrome/browser/plugin_process_host.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index f071a7a..0e06e3e 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -72,11 +72,11 @@ PluginNotificationTask::PluginNotificationTask( void PluginNotificationTask::Run() { // Verify that the notification type is one that makes sense. - switch (notification_type_) { - case NOTIFY_PLUGIN_PROCESS_HOST_CONNECTED: - case NOTIFY_PLUGIN_PROCESS_HOST_DISCONNECTED: - case NOTIFY_PLUGIN_PROCESS_CRASHED: - case NOTIFY_PLUGIN_INSTANCE_CREATED: + switch (notification_type_.value) { + case NotificationType::PLUGIN_PROCESS_HOST_CONNECTED: + case NotificationType::PLUGIN_PROCESS_HOST_DISCONNECTED: + case NotificationType::PLUGIN_PROCESS_CRASHED: + case NotificationType::PLUGIN_INSTANCE_CREATED: break; default: @@ -568,13 +568,14 @@ void PluginProcessHost::OnObjectSignaled(HANDLE object) { if (did_crash) { // Report that this plugin crashed. plugin_service_->main_message_loop()->PostTask(FROM_HERE, - new PluginNotificationTask(NOTIFY_PLUGIN_PROCESS_CRASHED, + new PluginNotificationTask(NotificationType::PLUGIN_PROCESS_CRASHED, plugin_path(), object)); } // Notify in the main loop of the disconnection. plugin_service_->main_message_loop()->PostTask(FROM_HERE, - new PluginNotificationTask(NOTIFY_PLUGIN_PROCESS_HOST_DISCONNECTED, - plugin_path(), object)); + new PluginNotificationTask( + NotificationType::PLUGIN_PROCESS_HOST_DISCONNECTED, + plugin_path(), object)); // Cancel all requests for plugin processes. // TODO(mpcomplete): use a real process ID when http://b/issue?id=1210062 is @@ -642,8 +643,9 @@ void PluginProcessHost::OnChannelConnected(int32 peer_pid) { // Notify in the main loop of the connection. plugin_service_->main_message_loop()->PostTask(FROM_HERE, - new PluginNotificationTask(NOTIFY_PLUGIN_PROCESS_HOST_CONNECTED, - plugin_path(), process())); + new PluginNotificationTask( + NotificationType::PLUGIN_PROCESS_HOST_CONNECTED, + plugin_path(), process())); } void PluginProcessHost::OnChannelError() { @@ -664,7 +666,7 @@ void PluginProcessHost::OpenChannelToPlugin( IPC::Message* reply_msg) { // Notify in the main loop of the instantiation. plugin_service_->main_message_loop()->PostTask(FROM_HERE, - new PluginNotificationTask(NOTIFY_PLUGIN_INSTANCE_CREATED, + new PluginNotificationTask(NotificationType::PLUGIN_INSTANCE_CREATED, plugin_path(), process())); if (opening_channel_) { |