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 "ui/views/controls/native/native_view_host.h" | 5 #include "ui/views/controls/native/native_view_host.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gfx/canvas.h" | 8 #include "ui/gfx/canvas.h" |
9 #include "ui/views/accessibility/native_view_accessibility.h" | 9 #include "ui/views/accessibility/native_view_accessibility.h" |
10 #include "ui/views/controls/native/native_view_host_wrapper.h" | 10 #include "ui/views/controls/native/native_view_host_wrapper.h" |
11 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 | 14 |
15 // static | 15 // static |
16 const char NativeViewHost::kViewClassName[] = "NativeViewHost"; | 16 const char NativeViewHost::kViewClassName[] = "NativeViewHost"; |
17 const char kWidgetNativeViewHostKey[] = "WidgetNativeViewHost"; | 17 const char kWidgetNativeViewHostKey[] = "WidgetNativeViewHost"; |
18 | 18 |
19 #if defined(USE_AURA) | |
20 // Views implementation draws the focus. | 19 // Views implementation draws the focus. |
21 // TODO(oshima): Eliminate this flag and consolidate | 20 // TODO(oshima): Eliminate this flag and consolidate |
22 // the focus border code. | 21 // the focus border code. |
23 const bool NativeViewHost::kRenderNativeControlFocus = false; | 22 const bool NativeViewHost::kRenderNativeControlFocus = false; |
24 #else | |
25 // static | |
26 const bool NativeViewHost::kRenderNativeControlFocus = true; | |
27 #endif | |
28 | 23 |
29 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
30 // NativeViewHost, public: | 25 // NativeViewHost, public: |
31 | 26 |
32 NativeViewHost::NativeViewHost() | 27 NativeViewHost::NativeViewHost() |
33 : native_view_(NULL), | 28 : native_view_(NULL), |
34 fast_resize_(false), | 29 fast_resize_(false), |
35 fast_resize_at_last_layout_(false), | 30 fast_resize_at_last_layout_(false), |
36 focus_view_(NULL) { | 31 focus_view_(NULL) { |
37 } | 32 } |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 Widget::GetAllChildWidgets(native_view(), &widgets); | 216 Widget::GetAllChildWidgets(native_view(), &widgets); |
222 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { | 217 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { |
223 focus_manager->ViewRemoved((*i)->GetRootView()); | 218 focus_manager->ViewRemoved((*i)->GetRootView()); |
224 if (!focus_manager->GetFocusedView()) | 219 if (!focus_manager->GetFocusedView()) |
225 return; | 220 return; |
226 } | 221 } |
227 } | 222 } |
228 | 223 |
229 | 224 |
230 } // namespace views | 225 } // namespace views |
OLD | NEW |