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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 118359: Don't call NPP_SetWindow before we have the plugin geometry. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « no previous file | chrome/common/render_messages.h » ('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/browser/renderer_host/render_widget_host_view_win.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/l10n_util_win.h" 9 #include "app/l10n_util_win.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 // We move the intermediate parent window which doesn't result in cross- 331 // We move the intermediate parent window which doesn't result in cross-
332 // process synchronous Windows messages. 332 // process synchronous Windows messages.
333 window = parent; 333 window = parent;
334 } 334 }
335 335
336 if (move.visible) 336 if (move.visible)
337 flags |= SWP_SHOWWINDOW; 337 flags |= SWP_SHOWWINDOW;
338 else 338 else
339 flags |= SWP_HIDEWINDOW; 339 flags |= SWP_HIDEWINDOW;
340 340
341 HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(), 341 if (move.rects_valid) {
342 move.clip_rect.y(), 342 HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(),
343 move.clip_rect.right(), 343 move.clip_rect.y(),
344 move.clip_rect.bottom()); 344 move.clip_rect.right(),
345 gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects); 345 move.clip_rect.bottom());
346 gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects);
346 347
347 // Note: System will own the hrgn after we call SetWindowRgn, 348 // Note: System will own the hrgn after we call SetWindowRgn,
348 // so we don't need to call DeleteObject(hrgn) 349 // so we don't need to call DeleteObject(hrgn)
349 ::SetWindowRgn(window, hrgn, !move.clip_rect.IsEmpty()); 350 ::SetWindowRgn(window, hrgn, !move.clip_rect.IsEmpty());
351 } else {
352 flags |= SWP_NOMOVE;
353 flags |= SWP_NOSIZE;
354 }
350 355
351 defer_window_pos_info = ::DeferWindowPos(defer_window_pos_info, 356 defer_window_pos_info = ::DeferWindowPos(defer_window_pos_info,
352 window, NULL, 357 window, NULL,
353 move.window_rect.x(), 358 move.window_rect.x(),
354 move.window_rect.y(), 359 move.window_rect.y(),
355 move.window_rect.width(), 360 move.window_rect.width(),
356 move.window_rect.height(), flags); 361 move.window_rect.height(), flags);
357 if (!defer_window_pos_info) { 362 if (!defer_window_pos_info) {
358 DCHECK(false) << "DeferWindowPos failed, so all plugin moves ignored."; 363 DCHECK(false) << "DeferWindowPos failed, so all plugin moves ignored.";
359 return; 364 return;
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 // WM_LBUTTONDOWN. 1313 // WM_LBUTTONDOWN.
1309 SetFocus(); 1314 SetFocus();
1310 } 1315 }
1311 } 1316 }
1312 1317
1313 void RenderWidgetHostViewWin::ShutdownHost() { 1318 void RenderWidgetHostViewWin::ShutdownHost() {
1314 shutdown_factory_.RevokeAll(); 1319 shutdown_factory_.RevokeAll();
1315 render_widget_host_->Shutdown(); 1320 render_widget_host_->Shutdown();
1316 // Do not touch any members at this point, |this| has been deleted. 1321 // Do not touch any members at this point, |this| has been deleted.
1317 } 1322 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698