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

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

Issue 42626: Report the plugin position to windowed plugins as (0,0)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | webkit/glue/plugins/test/plugin_window_size_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/plugin/webplugin_proxy.h" 5 #include "chrome/plugin/webplugin_proxy.h"
6 6
7 #include "base/gfx/gdi_util.h" 7 #include "base/gfx/gdi_util.h"
8 #include "base/scoped_handle.h" 8 #include "base/scoped_handle.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (parent_window_) { 63 if (parent_window_) {
64 PluginThread::current()->Send( 64 PluginThread::current()->Send(
65 new PluginProcessHostMsg_DestroyWindow(parent_window_)); 65 new PluginProcessHostMsg_DestroyWindow(parent_window_));
66 } 66 }
67 } 67 }
68 68
69 bool WebPluginProxy::Send(IPC::Message* msg) { 69 bool WebPluginProxy::Send(IPC::Message* msg) {
70 return channel_->Send(msg); 70 return channel_->Send(msg);
71 } 71 }
72 72
73 void WebPluginProxy::SetWindow(HWND window, HANDLE pump_messages_event) { 73 bool WebPluginProxy::SetWindow(HWND window, HANDLE pump_messages_event) {
74 HANDLE pump_messages_event_for_renderer = NULL; 74 HANDLE pump_messages_event_for_renderer = NULL;
75 75
76 if (pump_messages_event) { 76 if (pump_messages_event) {
77 DCHECK(window == NULL); 77 DCHECK(window == NULL);
78 DuplicateHandle(GetCurrentProcess(), pump_messages_event, 78 DuplicateHandle(GetCurrentProcess(), pump_messages_event,
79 channel_->renderer_handle(), 79 channel_->renderer_handle(),
80 &pump_messages_event_for_renderer, 80 &pump_messages_event_for_renderer,
81 0, FALSE, DUPLICATE_SAME_ACCESS); 81 0, FALSE, DUPLICATE_SAME_ACCESS);
82 DCHECK(pump_messages_event_for_renderer != NULL); 82 DCHECK(pump_messages_event_for_renderer != NULL);
83 } else { 83 } else {
(...skipping 13 matching lines...) Expand all
97 97
98 SetParent(window, parent_window_); 98 SetParent(window, parent_window_);
99 99
100 // We want the browser process to move this window which has a message loop 100 // We want the browser process to move this window which has a message loop
101 // in its process. 101 // in its process.
102 window = parent_window_; 102 window = parent_window_;
103 } 103 }
104 104
105 Send(new PluginHostMsg_SetWindow(route_id_, window, 105 Send(new PluginHostMsg_SetWindow(route_id_, window,
106 pump_messages_event_for_renderer)); 106 pump_messages_event_for_renderer));
107
108 return false;
107 } 109 }
108 110
109 void WebPluginProxy::CancelResource(int id) { 111 void WebPluginProxy::CancelResource(int id) {
110 Send(new PluginHostMsg_CancelResource(route_id_, id)); 112 Send(new PluginHostMsg_CancelResource(route_id_, id));
111 resource_clients_.erase(id); 113 resource_clients_.erase(id);
112 } 114 }
113 115
114 void WebPluginProxy::Invalidate() { 116 void WebPluginProxy::Invalidate() {
115 gfx::Rect rect(0, 0, 117 gfx::Rect rect(0, 0,
116 delegate_->GetRect().width(), 118 delegate_->GetRect().width(),
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 432
431 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, 433 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url,
432 range_info, existing_stream, 434 range_info, existing_stream,
433 notify_needed, notify_data)); 435 notify_needed, notify_data));
434 } 436 }
435 437
436 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { 438 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) {
437 Paint(damaged_rect); 439 Paint(damaged_rect);
438 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); 440 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect));
439 } 441 }
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | webkit/glue/plugins/test/plugin_window_size_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698