| 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/controls/native/native_view_host_wrapper.h" | 9 #include "ui/views/controls/native/native_view_host_wrapper.h" |
| 10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
| 11 | 11 |
| 12 namespace views { | 12 namespace views { |
| 13 | 13 |
| 14 // static | 14 // static |
| 15 const char NativeViewHost::kViewClassName[] = "views/NativeViewHost"; | 15 const char NativeViewHost::kViewClassName[] = "views/NativeViewHost"; |
| 16 | 16 |
| 17 #if defined(OS_LINUX) | 17 #if defined(USE_AURA) |
| 18 // GTK renders the focus. | 18 // Views implmenetatxion draws the focus. |
| 19 // static | 19 // TODO(oshima): Eliminate this flag and consolidate |
| 20 // the focus border code. |
| 20 const bool NativeViewHost::kRenderNativeControlFocus = false; | 21 const bool NativeViewHost::kRenderNativeControlFocus = false; |
| 21 #else | 22 #else |
| 22 // static | 23 // static |
| 23 const bool NativeViewHost::kRenderNativeControlFocus = true; | 24 const bool NativeViewHost::kRenderNativeControlFocus = true; |
| 24 #endif | 25 #endif |
| 25 | 26 |
| 26 //////////////////////////////////////////////////////////////////////////////// | 27 //////////////////////////////////////////////////////////////////////////////// |
| 27 // NativeViewHost, public: | 28 // NativeViewHost, public: |
| 28 | 29 |
| 29 NativeViewHost::NativeViewHost() | 30 NativeViewHost::NativeViewHost() |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // NativeViewHost, private: | 180 // NativeViewHost, private: |
| 180 | 181 |
| 181 void NativeViewHost::Detach(bool destroyed) { | 182 void NativeViewHost::Detach(bool destroyed) { |
| 182 if (native_view_) { | 183 if (native_view_) { |
| 183 native_wrapper_->NativeViewDetaching(destroyed); | 184 native_wrapper_->NativeViewDetaching(destroyed); |
| 184 native_view_ = NULL; | 185 native_view_ = NULL; |
| 185 } | 186 } |
| 186 } | 187 } |
| 187 | 188 |
| 188 } // namespace views | 189 } // namespace views |
| OLD | NEW |