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

Side by Side Diff: content/browser/tab_contents/tab_contents_view_win.cc

Issue 9695011: Fix repainting not happening when switching tabs after resizing the browser. I didn't copy this beh… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | « no previous file | no next file » | 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) 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/browser/tab_contents/tab_contents_view_win.h" 5 #include "content/browser/tab_contents/tab_contents_view_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/renderer_host/render_view_host_factory.h" 8 #include "content/browser/renderer_host/render_view_host_factory.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_view_win.h" 10 #include "content/browser/renderer_host/render_widget_host_view_win.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 if (drag_dest_.get()) { 332 if (drag_dest_.get()) {
333 RevokeDragDrop(GetNativeView()); 333 RevokeDragDrop(GetNativeView());
334 drag_dest_ = NULL; 334 drag_dest_ = NULL;
335 } 335 }
336 return 0; 336 return 0;
337 } 337 }
338 338
339 LRESULT TabContentsViewWin::OnWindowPosChanged( 339 LRESULT TabContentsViewWin::OnWindowPosChanged(
340 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { 340 UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) {
341 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(lparam); 341 WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(lparam);
342 if (window_pos->flags & SWP_HIDEWINDOW) {
343 tab_contents_->HideContents();
344 return 0;
345 }
346
347 // The TabContents was shown by a means other than the user selecting a
348 // Tab, e.g. the window was minimized then restored.
349 if (window_pos->flags & SWP_SHOWWINDOW)
350 tab_contents_->ShowContents();
351
352 // Unless we were specifically told not to size, cause the renderer to be
353 // sized to the new bounds, which forces a repaint. Not required for the
354 // simple minimize-restore case described above, for example, since the
355 // size hasn't changed.
342 if (window_pos->flags & SWP_NOSIZE) 356 if (window_pos->flags & SWP_NOSIZE)
343 return 0; 357 return 0;
344 358
345 gfx::Size size(window_pos->cx, window_pos->cy); 359 gfx::Size size(window_pos->cx, window_pos->cy);
346 if (tab_contents_->GetInterstitialPage()) 360 if (tab_contents_->GetInterstitialPage())
347 tab_contents_->GetInterstitialPage()->SetSize(size); 361 tab_contents_->GetInterstitialPage()->SetSize(size);
348 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); 362 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView();
349 if (rwhv) 363 if (rwhv)
350 rwhv->SetSize(size); 364 rwhv->SetSize(size);
351 365
(...skipping 30 matching lines...) Expand all
382 // This message is reflected from the view() to this window. 396 // This message is reflected from the view() to this window.
383 if (GET_KEYSTATE_WPARAM(message->wParam) & MK_CONTROL) { 397 if (GET_KEYSTATE_WPARAM(message->wParam) & MK_CONTROL) {
384 tab_contents_->GetDelegate()->ContentsZoomChange( 398 tab_contents_->GetDelegate()->ContentsZoomChange(
385 GET_WHEEL_DELTA_WPARAM(message->wParam) > 0); 399 GET_WHEEL_DELTA_WPARAM(message->wParam) > 0);
386 return 1; 400 return 1;
387 } 401 }
388 break; 402 break;
389 } 403 }
390 return 0; 404 return 0;
391 } 405 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698