| OLD | NEW |
| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 tab_contents()->render_view_host()->render_view_termination_status(); | 405 tab_contents()->render_view_host()->render_view_termination_status(); |
| 406 SadTabView::Kind kind = | 406 SadTabView::Kind kind = |
| 407 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? | 407 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? |
| 408 SadTabView::KILLED : SadTabView::CRASHED; | 408 SadTabView::KILLED : SadTabView::CRASHED; |
| 409 sad_tab_ = new SadTabView(tab_contents(), kind); | 409 sad_tab_ = new SadTabView(tab_contents(), kind); |
| 410 SetContentsView(sad_tab_); | 410 SetContentsView(sad_tab_); |
| 411 CRect cr; | 411 CRect cr; |
| 412 GetClientRect(&cr); | 412 GetClientRect(&cr); |
| 413 sad_tab_->SetBoundsRect(gfx::Rect(cr)); | 413 sad_tab_->SetBoundsRect(gfx::Rect(cr)); |
| 414 gfx::CanvasSkiaPaint canvas(GetNativeView(), true); | 414 gfx::CanvasSkiaPaint canvas(GetNativeView(), true); |
| 415 sad_tab_->ProcessPaint(&canvas); | 415 sad_tab_->Paint(&canvas); |
| 416 return; | 416 return; |
| 417 } | 417 } |
| 418 | 418 |
| 419 // We need to do this to validate the dirty area so we don't end up in a | 419 // We need to do this to validate the dirty area so we don't end up in a |
| 420 // WM_PAINTstorm that causes other mysterious bugs (such as WM_TIMERs not | 420 // WM_PAINTstorm that causes other mysterious bugs (such as WM_TIMERs not |
| 421 // firing etc). It doesn't matter that we don't have any non-clipped area. | 421 // firing etc). It doesn't matter that we don't have any non-clipped area. |
| 422 CPaintDC dc(GetNativeView()); | 422 CPaintDC dc(GetNativeView()); |
| 423 SetMsgHandled(FALSE); | 423 SetMsgHandled(FALSE); |
| 424 } | 424 } |
| 425 | 425 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 } | 571 } |
| 572 return false; | 572 return false; |
| 573 } | 573 } |
| 574 | 574 |
| 575 void TabContentsViewWin::WheelZoom(int distance) { | 575 void TabContentsViewWin::WheelZoom(int distance) { |
| 576 if (tab_contents()->delegate()) { | 576 if (tab_contents()->delegate()) { |
| 577 bool zoom_in = distance > 0; | 577 bool zoom_in = distance > 0; |
| 578 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 578 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
| 579 } | 579 } |
| 580 } | 580 } |
| OLD | NEW |