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

Unified Diff: content/browser/plugin_process_host_mac.cc

Issue 8536037: base::Bind: Low-hanging fruit conversions of NewRunnableFunction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix 4. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/plugin_service_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 95b9a848983ca4cb478559cd3f169a6fe86e20c9..99e3e277b2b08b99b48f34b7f55e3b96486d1ba8 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));
}
}
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/browser/plugin_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698