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

Side by Side Diff: content/plugin/webplugin_proxy.cc

Issue 10082018: Move BrokerDuplicateHandle() to be declared in content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/plugin/webplugin_proxy.h" 5 #include "content/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 18 matching lines...) Expand all
29 #include "base/mac/mac_util.h" 29 #include "base/mac/mac_util.h"
30 #include "base/mac/scoped_cftyperef.h" 30 #include "base/mac/scoped_cftyperef.h"
31 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" 31 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h"
32 #endif 32 #endif
33 33
34 #if defined(USE_X11) 34 #if defined(USE_X11)
35 #include "ui/base/x/x11_util_internal.h" 35 #include "ui/base/x/x11_util_internal.h"
36 #endif 36 #endif
37 37
38 #if defined(OS_WIN) 38 #if defined(OS_WIN)
39 #include "content/common/sandbox_policy.h" 39 #include "content/public/common/sandbox_init.h"
40 #endif 40 #endif
41 41
42 using WebKit::WebBindings; 42 using WebKit::WebBindings;
43 43
44 using webkit::npapi::WebPluginResourceClient; 44 using webkit::npapi::WebPluginResourceClient;
45 #if defined(OS_MACOSX) 45 #if defined(OS_MACOSX)
46 using webkit::npapi::WebPluginAcceleratedSurface; 46 using webkit::npapi::WebPluginAcceleratedSurface;
47 #endif 47 #endif
48 48
49 WebPluginProxy::WebPluginProxy( 49 WebPluginProxy::WebPluginProxy(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #elif defined(USE_X11) 126 #elif defined(USE_X11)
127 // Nothing to do. 127 // Nothing to do.
128 #else 128 #else
129 NOTIMPLEMENTED(); 129 NOTIMPLEMENTED();
130 #endif 130 #endif
131 } 131 }
132 132
133 #if defined(OS_WIN) 133 #if defined(OS_WIN)
134 void WebPluginProxy::SetWindowlessPumpEvent(HANDLE pump_messages_event) { 134 void WebPluginProxy::SetWindowlessPumpEvent(HANDLE pump_messages_event) {
135 HANDLE pump_messages_event_for_renderer = NULL; 135 HANDLE pump_messages_event_for_renderer = NULL;
136 sandbox::BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(), 136 content::BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(),
137 &pump_messages_event_for_renderer, 137 &pump_messages_event_for_renderer,
138 SYNCHRONIZE | EVENT_MODIFY_STATE, 0); 138 SYNCHRONIZE | EVENT_MODIFY_STATE, 0);
139 DCHECK(pump_messages_event_for_renderer != NULL); 139 DCHECK(pump_messages_event_for_renderer != NULL);
140 Send(new PluginHostMsg_SetWindowlessPumpEvent( 140 Send(new PluginHostMsg_SetWindowlessPumpEvent(
141 route_id_, pump_messages_event_for_renderer)); 141 route_id_, pump_messages_event_for_renderer));
142 } 142 }
143 143
144 void WebPluginProxy::ReparentPluginWindow(HWND window, HWND parent) { 144 void WebPluginProxy::ReparentPluginWindow(HWND window, HWND parent) {
145 PluginThread::current()->Send( 145 PluginThread::current()->Send(
146 new PluginProcessHostMsg_ReparentPluginWindow(window, parent)); 146 new PluginProcessHostMsg_ReparentPluginWindow(window, parent));
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 // Retrieve the IME status from a plug-in and send it to a renderer process 770 // Retrieve the IME status from a plug-in and send it to a renderer process
771 // when the plug-in has updated it. 771 // when the plug-in has updated it.
772 int input_type; 772 int input_type;
773 gfx::Rect caret_rect; 773 gfx::Rect caret_rect;
774 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) 774 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
775 return; 775 return;
776 776
777 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); 777 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
778 } 778 }
779 #endif 779 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698