| 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 "views/view.h" | 5 #include "views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #ifndef NDEBUG | 8 #ifndef NDEBUG |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #endif | 10 #endif |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 if (parent_) { | 568 if (parent_) { |
| 569 // Translate the requested paint rect to the parent's coordinate system | 569 // Translate the requested paint rect to the parent's coordinate system |
| 570 // then pass this notification up to the parent. | 570 // then pass this notification up to the parent. |
| 571 gfx::Rect paint_rect = r; | 571 gfx::Rect paint_rect = r; |
| 572 paint_rect.Offset(GetMirroredPosition()); | 572 paint_rect.Offset(GetMirroredPosition()); |
| 573 parent_->SchedulePaint(paint_rect, urgent); | 573 parent_->SchedulePaint(paint_rect, urgent); |
| 574 } | 574 } |
| 575 } | 575 } |
| 576 | 576 |
| 577 void View::SchedulePaint() { | 577 void View::SchedulePaint() { |
| 578 SchedulePaint(GetContentsBounds(), false); | 578 SchedulePaint(GetLocalBounds(), false); |
| 579 } | 579 } |
| 580 | 580 |
| 581 void View::Paint(gfx::Canvas* canvas) { | 581 void View::Paint(gfx::Canvas* canvas) { |
| 582 PaintBackground(canvas); | 582 PaintBackground(canvas); |
| 583 PaintFocusBorder(canvas); | 583 PaintFocusBorder(canvas); |
| 584 PaintBorder(canvas); | 584 PaintBorder(canvas); |
| 585 } | 585 } |
| 586 | 586 |
| 587 void View::PaintBackground(gfx::Canvas* canvas) { | 587 void View::PaintBackground(gfx::Canvas* canvas) { |
| 588 if (background_.get()) | 588 if (background_.get()) |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 OSExchangeData data; | 1568 OSExchangeData data; |
| 1569 WriteDragData(press_pt, &data); | 1569 WriteDragData(press_pt, &data); |
| 1570 | 1570 |
| 1571 // Message the RootView to do the drag and drop. That way if we're removed | 1571 // Message the RootView to do the drag and drop. That way if we're removed |
| 1572 // the RootView can detect it and avoid calling us back. | 1572 // the RootView can detect it and avoid calling us back. |
| 1573 RootView* root_view = GetRootView(); | 1573 RootView* root_view = GetRootView(); |
| 1574 root_view->StartDragForViewFromMouseEvent(this, data, drag_operations); | 1574 root_view->StartDragForViewFromMouseEvent(this, data, drag_operations); |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 } // namespace views | 1577 } // namespace views |
| OLD | NEW |