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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl_win.cc

Issue 181014: Eliminate remaining WebCore dependencies from webplugin_impl.cc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/glue/plugins/webplugin_delegate_impl.h" 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void WebPluginDelegateImpl::PluginDestroyed() { 240 void WebPluginDelegateImpl::PluginDestroyed() {
241 if (handle_event_depth_) { 241 if (handle_event_depth_) {
242 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 242 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
243 } else { 243 } else {
244 delete this; 244 delete this;
245 } 245 }
246 } 246 }
247 247
248 void WebPluginDelegateImpl::PlatformInitialize(WebPlugin* plugin) { 248 void WebPluginDelegateImpl::PlatformInitialize() {
249 plugin->SetWindow(windowed_handle_); 249 plugin_->SetWindow(windowed_handle_);
250 if (windowless_) { 250 if (windowless_) {
251 CreateDummyWindowForActivation(); 251 CreateDummyWindowForActivation();
252 handle_event_pump_messages_event_ = CreateEvent(NULL, TRUE, FALSE, NULL); 252 handle_event_pump_messages_event_ = CreateEvent(NULL, TRUE, FALSE, NULL);
253 plugin->SetWindowlessPumpEvent(handle_event_pump_messages_event_); 253 plugin_->SetWindowlessPumpEvent(handle_event_pump_messages_event_);
254 } 254 }
255 255
256 // The windowless version of the Silverlight plugin calls the 256 // The windowless version of the Silverlight plugin calls the
257 // WindowFromPoint API and passes the result of that to the 257 // WindowFromPoint API and passes the result of that to the
258 // TrackPopupMenu API call as the owner window. This causes the API 258 // TrackPopupMenu API call as the owner window. This causes the API
259 // to fail as the API expects the window handle to live on the same 259 // to fail as the API expects the window handle to live on the same
260 // thread as the caller. It works in the other browsers as the plugin 260 // thread as the caller. It works in the other browsers as the plugin
261 // lives on the browser thread. Our workaround is to intercept the 261 // lives on the browser thread. Our workaround is to intercept the
262 // TrackPopupMenu API for Silverlight and replace the window handle 262 // TrackPopupMenu API for Silverlight and replace the window handle
263 // with the dummy activation window. 263 // with the dummy activation window.
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 1146
1147 // It is ok to pass NULL here to GetCursor as we are not looking for cursor 1147 // It is ok to pass NULL here to GetCursor as we are not looking for cursor
1148 // types defined by Webkit. 1148 // types defined by Webkit.
1149 HCURSOR previous_cursor = 1149 HCURSOR previous_cursor =
1150 g_current_plugin_instance->current_windowless_cursor_.GetCursor(NULL); 1150 g_current_plugin_instance->current_windowless_cursor_.GetCursor(NULL);
1151 1151
1152 g_current_plugin_instance->current_windowless_cursor_.InitFromExternalCursor( 1152 g_current_plugin_instance->current_windowless_cursor_.InitFromExternalCursor(
1153 cursor); 1153 cursor);
1154 return previous_cursor; 1154 return previous_cursor;
1155 } 1155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698