| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "ui/views/views_delegate.h" | 31 #include "ui/views/views_delegate.h" |
| 32 #include "ui/views/widget/native_widget.h" | 32 #include "ui/views/widget/native_widget.h" |
| 33 #include "ui/views/widget/root_view.h" | 33 #include "ui/views/widget/root_view.h" |
| 34 #include "ui/views/window/dialog_client_view.h" | 34 #include "ui/views/window/dialog_client_view.h" |
| 35 #include "ui/views/window/dialog_delegate.h" | 35 #include "ui/views/window/dialog_delegate.h" |
| 36 | 36 |
| 37 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
| 38 #include "ui/views/test/test_views_delegate.h" | 38 #include "ui/views/test/test_views_delegate.h" |
| 39 #endif | 39 #endif |
| 40 #if defined(USE_AURA) | 40 #if defined(USE_AURA) |
| 41 #include "ui/aura/root_window.h" | 41 #include "ui/aura/window_event_dispatcher.h" |
| 42 #include "ui/events/gestures/gesture_recognizer.h" | 42 #include "ui/events/gestures/gesture_recognizer.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 using base::ASCIIToUTF16; | 45 using base::ASCIIToUTF16; |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 // Returns true if |ancestor| is an ancestor of |layer|. | 49 // Returns true if |ancestor| is an ancestor of |layer|. |
| 50 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { | 50 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { |
| 51 while (layer && layer != ancestor) | 51 while (layer && layer != ancestor) |
| (...skipping 3566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3618 TestView view; | 3618 TestView view; |
| 3619 view.SetFocusable(true); | 3619 view.SetFocusable(true); |
| 3620 EXPECT_TRUE(view.focusable()); | 3620 EXPECT_TRUE(view.focusable()); |
| 3621 view.SetEnabled(false); | 3621 view.SetEnabled(false); |
| 3622 EXPECT_TRUE(view.focusable()); | 3622 EXPECT_TRUE(view.focusable()); |
| 3623 view.SetFocusable(false); | 3623 view.SetFocusable(false); |
| 3624 EXPECT_FALSE(view.focusable()); | 3624 EXPECT_FALSE(view.focusable()); |
| 3625 } | 3625 } |
| 3626 | 3626 |
| 3627 } // namespace views | 3627 } // namespace views |
| OLD | NEW |