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

Unified Diff: content/browser/plugin_process_host.cc

Issue 14339002: Mac Plugins: Remove PluginProcessHost dtor check that it is on the UI thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_process_host.cc
===================================================================
--- content/browser/plugin_process_host.cc (revision 194743)
+++ content/browser/plugin_process_host.cc (working copy)
@@ -121,32 +121,22 @@
std::set<HWND>::iterator window_index;
for (window_index = plugin_parent_windows_set_.begin();
window_index != plugin_parent_windows_set_.end();
- window_index++) {
+ ++window_index) {
PostMessage(*window_index, WM_CLOSE, 0, 0);
}
#elif defined(OS_MACOSX)
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
// If the plugin process crashed but had fullscreen windows open at the time,
// make sure that the menu bar is visible.
- std::set<uint32>::iterator window_index;
- for (window_index = plugin_fullscreen_windows_set_.begin();
- window_index != plugin_fullscreen_windows_set_.end();
- window_index++) {
- if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::mac::ReleaseFullScreen(base::mac::kFullScreenModeHideAll);
- } else {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(base::mac::ReleaseFullScreen,
- base::mac::kFullScreenModeHideAll));
- }
+ for (size_t i = 0; i < plugin_fullscreen_windows_set_.size(); ++i) {
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(base::mac::ReleaseFullScreen,
+ base::mac::kFullScreenModeHideAll));
}
// If the plugin hid the cursor, reset that.
if (!plugin_cursor_visible_) {
- if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::mac::SetCursorVisibility(true);
- } else {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(base::mac::SetCursorVisibility, true));
- }
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(base::mac::SetCursorVisibility, true));
}
#endif
// Cancel all pending and sent requests.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698