| 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 "ash/drag_drop/drag_drop_controller.h" | 5 #include "ash/drag_drop/drag_drop_controller.h" |
| 6 | 6 |
| 7 #include "ash/drag_drop/drag_image_view.h" | 7 #include "ash/drag_drop/drag_image_view.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 | 227 |
| 228 private: | 228 private: |
| 229 bool check_if_capture_lost_; | 229 bool check_if_capture_lost_; |
| 230 | 230 |
| 231 DISALLOW_COPY_AND_ASSIGN(TestNativeWidgetAura); | 231 DISALLOW_COPY_AND_ASSIGN(TestNativeWidgetAura); |
| 232 }; | 232 }; |
| 233 | 233 |
| 234 // TODO(sky): this is for debugging, remove when track down failure. | 234 // TODO(sky): this is for debugging, remove when track down failure. |
| 235 void SetCheckIfCaptureLost(views::Widget* widget, bool value) { | 235 void SetCheckIfCaptureLost(views::Widget* widget, bool value) { |
| 236 // On Windows, the DCHECK triggers when running on bot or locally through RDP, |
| 237 // but not when logged in locally. |
| 238 #if !defined(OS_WIN) |
| 236 static_cast<TestNativeWidgetAura*>(widget->native_widget())-> | 239 static_cast<TestNativeWidgetAura*>(widget->native_widget())-> |
| 237 set_check_if_capture_lost(value); | 240 set_check_if_capture_lost(value); |
| 241 #endif |
| 238 } | 242 } |
| 239 | 243 |
| 240 views::Widget* CreateNewWidget() { | 244 views::Widget* CreateNewWidget() { |
| 241 views::Widget* widget = new views::Widget; | 245 views::Widget* widget = new views::Widget; |
| 242 views::Widget::InitParams params; | 246 views::Widget::InitParams params; |
| 243 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; | 247 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; |
| 244 params.accept_events = true; | 248 params.accept_events = true; |
| 245 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 249 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 246 params.parent = Shell::GetPrimaryRootWindow(); | 250 params.parent = Shell::GetPrimaryRootWindow(); |
| 247 params.child = true; | 251 params.child = true; |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); | 979 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); |
| 976 } | 980 } |
| 977 for (Shell::RootWindowList::iterator iter = root_windows.begin(); | 981 for (Shell::RootWindowList::iterator iter = root_windows.begin(); |
| 978 iter != root_windows.end(); ++iter) { | 982 iter != root_windows.end(); ++iter) { |
| 979 aura::client::SetDragDropClient(*iter, NULL); | 983 aura::client::SetDragDropClient(*iter, NULL); |
| 980 } | 984 } |
| 981 } | 985 } |
| 982 | 986 |
| 983 } // namespace test | 987 } // namespace test |
| 984 } // namespace aura | 988 } // namespace aura |
| OLD | NEW |