diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-12 17:10:58 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-12 17:10:58 +0000 |
commit | 8075105cb6bc684ebfe613edd6a9a27384c80d7e (patch) | |
tree | 86386ce875a2fd3e08db4fd4cd9f6e9b09c096cb /content/browser/plugin_process_host_mac.cc | |
parent | 82f4b8292a2bf50213b9ae86399303f907e930e0 (diff) | |
download | chromium_src-8075105cb6bc684ebfe613edd6a9a27384c80d7e.zip chromium_src-8075105cb6bc684ebfe613edd6a9a27384c80d7e.tar.gz chromium_src-8075105cb6bc684ebfe613edd6a9a27384c80d7e.tar.bz2 |
base::Bind: Low-hanging fruit conversions of NewRunnableFunction.
BUG=none
TEST=none
R=csilv@chromium.org
Review URL: http://codereview.chromium.org/8536037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_process_host_mac.cc')
-rw-r--r-- | content/browser/plugin_process_host_mac.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/content/browser/plugin_process_host_mac.cc b/content/browser/plugin_process_host_mac.cc index 95b9a84..99e3e27 100644 --- a/content/browser/plugin_process_host_mac.cc +++ b/content/browser/plugin_process_host_mac.cc @@ -8,6 +8,7 @@ #include <vector> +#include "base/bind.h" #include "base/logging.h" #include "base/mac/mac_util.h" #include "content/browser/plugin_process_host.h" @@ -44,10 +45,9 @@ void PluginProcessHost::OnPluginShowWindow(uint32 window_id, // the main display, hide the menubar so that it has the whole screen. // (but only if we haven't already seen this fullscreen window, since // otherwise our refcounting can get skewed). - BrowserThread::PostTask( - BrowserThread::UI, FROM_HERE, - NewRunnableFunction(base::mac::RequestFullScreen, - base::mac::kFullScreenModeHideAll)); + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, + base::Bind(base::mac::RequestFullScreen, + base::mac::kFullScreenModeHideAll)); } } @@ -77,16 +77,14 @@ void PluginProcessHost::OnPluginHideWindow(uint32 window_id, plugin_fullscreen_windows_set_.erase(window_id); pid_t plugin_pid = browser_needs_activation ? -1 : handle(); browser_needs_activation = false; - BrowserThread::PostTask( - BrowserThread::UI, FROM_HERE, - NewRunnableFunction(ReleasePluginFullScreen, plugin_pid)); + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, + base::Bind(ReleasePluginFullScreen, plugin_pid)); } if (browser_needs_activation) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, - NewRunnableFunction(base::mac::ActivateProcess, - base::GetCurrentProcId())); + base::Bind(base::mac::ActivateProcess, base::GetCurrentProcId())); } } @@ -96,18 +94,16 @@ void PluginProcessHost::OnAppActivation() { // If our plugin process has any modal windows up, we need to bring it forward // so that they act more like an in-process modal window would. if (!plugin_modal_windows_set_.empty()) { - BrowserThread::PostTask( - BrowserThread::UI, FROM_HERE, - NewRunnableFunction(base::mac::ActivateProcess, handle())); + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, + base::Bind(base::mac::ActivateProcess, handle())); } } void PluginProcessHost::OnPluginSetCursorVisibility(bool visible) { if (plugin_cursor_visible_ != visible) { plugin_cursor_visible_ = visible; - BrowserThread::PostTask( - BrowserThread::UI, FROM_HERE, - NewRunnableFunction(base::mac::SetCursorVisibility, - visible)); + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, + base::Bind(base::mac::SetCursorVisibility, + visible)); } } |