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

Side by Side Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc

Issue 6347015: This fixes a problem with the aw snap page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding windows fix Created 9 years, 11 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/browser/ui/views/tab_contents/tab_contents_view_gtk.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/tab_contents/tab_contents_view_win.h" 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 default: 396 default:
397 break; 397 break;
398 } 398 }
399 399
400 return 0; 400 return 0;
401 } 401 }
402 402
403 void TabContentsViewWin::OnPaint(HDC junk_dc) { 403 void TabContentsViewWin::OnPaint(HDC junk_dc) {
404 if (tab_contents()->render_view_host() && 404 if (tab_contents()->render_view_host() &&
405 !tab_contents()->render_view_host()->IsRenderViewLive()) { 405 !tab_contents()->render_view_host()->IsRenderViewLive()) {
406 if (sad_tab_ == NULL) { 406 base::TerminationStatus status =
407 base::TerminationStatus status = 407 tab_contents()->render_view_host()->render_view_termination_status();
408 tab_contents()->render_view_host()->render_view_termination_status(); 408 SadTabView::Kind kind =
409 SadTabView::Kind kind = 409 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ?
410 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? 410 SadTabView::KILLED : SadTabView::CRASHED;
411 SadTabView::KILLED : SadTabView::CRASHED; 411 sad_tab_ = new SadTabView(tab_contents(), kind);
412 sad_tab_ = new SadTabView(tab_contents(), kind); 412 SetContentsView(sad_tab_);
413 SetContentsView(sad_tab_);
414 }
415 CRect cr; 413 CRect cr;
416 GetClientRect(&cr); 414 GetClientRect(&cr);
417 sad_tab_->SetBounds(gfx::Rect(cr)); 415 sad_tab_->SetBounds(gfx::Rect(cr));
418 gfx::CanvasSkiaPaint canvas(GetNativeView(), true); 416 gfx::CanvasSkiaPaint canvas(GetNativeView(), true);
419 sad_tab_->ProcessPaint(&canvas); 417 sad_tab_->ProcessPaint(&canvas);
420 return; 418 return;
421 } 419 }
422 420
423 // We need to do this to validate the dirty area so we don't end up in a 421 // We need to do this to validate the dirty area so we don't end up in a
424 // WM_PAINTstorm that causes other mysterious bugs (such as WM_TIMERs not 422 // WM_PAINTstorm that causes other mysterious bugs (such as WM_TIMERs not
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 573 }
576 return false; 574 return false;
577 } 575 }
578 576
579 void TabContentsViewWin::WheelZoom(int distance) { 577 void TabContentsViewWin::WheelZoom(int distance) {
580 if (tab_contents()->delegate()) { 578 if (tab_contents()->delegate()) {
581 bool zoom_in = distance > 0; 579 bool zoom_in = distance > 0;
582 tab_contents()->delegate()->ContentsZoomChange(zoom_in); 580 tab_contents()->delegate()->ContentsZoomChange(zoom_in);
583 } 581 }
584 } 582 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698