| OLD | NEW |
| 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 "views/widget/root_view.h" | 5 #include "views/widget/root_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/drag_drop_types.h" | 9 #include "app/drag_drop_types.h" |
| 10 #include "app/gfx/chrome_canvas.h" | 10 #include "app/gfx/canvas.h" |
| 11 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
| 12 #include "base/base_drag_source.h" | 12 #include "base/base_drag_source.h" |
| 13 #endif | 13 #endif |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
| 17 #include "views/focus/view_storage.h" | 17 #include "views/focus/view_storage.h" |
| 18 #include "views/widget/root_view_drop_target.h" | 18 #include "views/widget/root_view_drop_target.h" |
| 19 #endif | 19 #endif |
| 20 #include "views/widget/widget.h" | 20 #include "views/widget/widget.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 ~ScopedProcessingPaint() { | 140 ~ScopedProcessingPaint() { |
| 141 *is_processing_paint_ = false; | 141 *is_processing_paint_ = false; |
| 142 } | 142 } |
| 143 private: | 143 private: |
| 144 bool* is_processing_paint_; | 144 bool* is_processing_paint_; |
| 145 | 145 |
| 146 DISALLOW_EVIL_CONSTRUCTORS(ScopedProcessingPaint); | 146 DISALLOW_EVIL_CONSTRUCTORS(ScopedProcessingPaint); |
| 147 }; | 147 }; |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 void RootView::ProcessPaint(ChromeCanvas* canvas) { | 150 void RootView::ProcessPaint(gfx::Canvas* canvas) { |
| 151 #ifndef NDEBUG | 151 #ifndef NDEBUG |
| 152 ScopedProcessingPaint processing_paint(&is_processing_paint_); | 152 ScopedProcessingPaint processing_paint(&is_processing_paint_); |
| 153 #endif | 153 #endif |
| 154 | 154 |
| 155 // Clip the invalid rect to our bounds. If a view is in a scrollview | 155 // Clip the invalid rect to our bounds. If a view is in a scrollview |
| 156 // it could be a lot larger | 156 // it could be a lot larger |
| 157 invalid_rect_ = GetScheduledPaintRectConstrainedToSize(); | 157 invalid_rect_ = GetScheduledPaintRectConstrainedToSize(); |
| 158 | 158 |
| 159 if (invalid_rect_.IsEmpty()) | 159 if (invalid_rect_.IsEmpty()) |
| 160 return; | 160 return; |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 | 916 |
| 917 void RootView::SetAccessibleName(const std::wstring& name) { | 917 void RootView::SetAccessibleName(const std::wstring& name) { |
| 918 accessible_name_.assign(name); | 918 accessible_name_.assign(name); |
| 919 } | 919 } |
| 920 | 920 |
| 921 View* RootView::GetDragView() { | 921 View* RootView::GetDragView() { |
| 922 return drag_view_; | 922 return drag_view_; |
| 923 } | 923 } |
| 924 | 924 |
| 925 } // namespace views | 925 } // namespace views |
| OLD | NEW |