OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 if (browser_needs_activation) { | 78 if (browser_needs_activation) { |
79 BrowserThread::PostTask( | 79 BrowserThread::PostTask( |
80 BrowserThread::UI, FROM_HERE, | 80 BrowserThread::UI, FROM_HERE, |
81 base::Bind(base::mac::ActivateProcess, base::GetCurrentProcId())); | 81 base::Bind(base::mac::ActivateProcess, base::GetCurrentProcId())); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 void PluginProcessHost::OnAppActivation() { | 85 void PluginProcessHost::OnAppActivation() { |
86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 86 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
87 | 87 |
88 // If our plugin process has any modal windows up, we need to bring it forward | 88 // If our plugin process has any modal windows up, we need to bring it forward |
89 // so that they act more like an in-process modal window would. | 89 // so that they act more like an in-process modal window would. |
90 if (!plugin_modal_windows_set_.empty()) { | 90 if (!plugin_modal_windows_set_.empty()) { |
91 BrowserThread::PostTask( | 91 BrowserThread::PostTask( |
92 BrowserThread::UI, FROM_HERE, | 92 BrowserThread::UI, FROM_HERE, |
93 base::Bind(base::mac::ActivateProcess, process_->GetData().handle)); | 93 base::Bind(base::mac::ActivateProcess, process_->GetData().handle)); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 void PluginProcessHost::OnPluginSetCursorVisibility(bool visible) { | 97 void PluginProcessHost::OnPluginSetCursorVisibility(bool visible) { |
98 if (plugin_cursor_visible_ != visible) { | 98 if (plugin_cursor_visible_ != visible) { |
99 plugin_cursor_visible_ = visible; | 99 plugin_cursor_visible_ = visible; |
100 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 100 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
101 base::Bind(base::mac::SetCursorVisibility, | 101 base::Bind(base::mac::SetCursorVisibility, |
102 visible)); | 102 visible)); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 } // namespace content | 106 } // namespace content |
OLD | NEW |