OLD | NEW |
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 "chrome/browser/ui/views/panels/panel_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_view.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 void NativePanelTestingWin::CancelDragTitlebar() { | 132 void NativePanelTestingWin::CancelDragTitlebar() { |
133 panel_view_->OnTitlebarMouseCaptureLost(); | 133 panel_view_->OnTitlebarMouseCaptureLost(); |
134 } | 134 } |
135 | 135 |
136 void NativePanelTestingWin::FinishDragTitlebar() { | 136 void NativePanelTestingWin::FinishDragTitlebar() { |
137 panel_view_->OnTitlebarMouseReleased(panel::NO_MODIFIER); | 137 panel_view_->OnTitlebarMouseReleased(panel::NO_MODIFIER); |
138 } | 138 } |
139 | 139 |
140 bool NativePanelTestingWin::VerifyDrawingAttention() const { | 140 bool NativePanelTestingWin::VerifyDrawingAttention() const { |
141 MessageLoop::current()->RunUntilIdle(); | 141 base::MessageLoop::current()->RunUntilIdle(); |
142 return panel_view_->GetFrameView()->GetPaintState() == | 142 return panel_view_->GetFrameView()->GetPaintState() == |
143 PanelFrameView::PAINT_FOR_ATTENTION; | 143 PanelFrameView::PAINT_FOR_ATTENTION; |
144 } | 144 } |
145 | 145 |
146 bool NativePanelTestingWin::VerifyActiveState(bool is_active) { | 146 bool NativePanelTestingWin::VerifyActiveState(bool is_active) { |
147 return panel_view_->GetFrameView()->GetPaintState() == | 147 return panel_view_->GetFrameView()->GetPaintState() == |
148 (is_active ? PanelFrameView::PAINT_AS_ACTIVE | 148 (is_active ? PanelFrameView::PAINT_AS_ACTIVE |
149 : PanelFrameView::PAINT_AS_INACTIVE); | 149 : PanelFrameView::PAINT_AS_INACTIVE); |
150 } | 150 } |
151 | 151 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 DCHECK(thickness_for_mouse_resizing > 0); | 1107 DCHECK(thickness_for_mouse_resizing > 0); |
1108 SkRegion* region = new SkRegion; | 1108 SkRegion* region = new SkRegion; |
1109 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); | 1109 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); |
1110 region->op(width - thickness_for_mouse_resizing, 0, width, height, | 1110 region->op(width - thickness_for_mouse_resizing, 0, width, height, |
1111 SkRegion::kUnion_Op); | 1111 SkRegion::kUnion_Op); |
1112 region->op(0, height - thickness_for_mouse_resizing, width, height, | 1112 region->op(0, height - thickness_for_mouse_resizing, width, height, |
1113 SkRegion::kUnion_Op); | 1113 SkRegion::kUnion_Op); |
1114 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); | 1114 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); |
1115 #endif | 1115 #endif |
1116 } | 1116 } |
OLD | NEW |