From 8075105cb6bc684ebfe613edd6a9a27384c80d7e Mon Sep 17 00:00:00 2001
From: "jhawkins@chromium.org"
 <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Sat, 12 Nov 2011 17:10:58 +0000
Subject: 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
---
 content/browser/plugin_process_host_mac.cc | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

(limited to 'content/browser/plugin_process_host_mac.cc')

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));
   }
 }
-- 
cgit v1.1