| 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" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const bool NativeViewHost::kRenderNativeControlFocus = true; | 26 const bool NativeViewHost::kRenderNativeControlFocus = true; |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
| 30 // NativeViewHost, public: | 30 // NativeViewHost, public: |
| 31 | 31 |
| 32 NativeViewHost::NativeViewHost() | 32 NativeViewHost::NativeViewHost() |
| 33 : native_view_(NULL), | 33 : native_view_(NULL), |
| 34 fast_resize_(false), | 34 fast_resize_(false), |
| 35 fast_resize_at_last_layout_(false), | 35 fast_resize_at_last_layout_(false), |
| 36 fast_resize_gravity_(FAST_RESIZE_GRAVITY_NORTHWEST), |
| 36 focus_view_(NULL) { | 37 focus_view_(NULL) { |
| 37 } | 38 } |
| 38 | 39 |
| 39 NativeViewHost::~NativeViewHost() { | 40 NativeViewHost::~NativeViewHost() { |
| 40 } | 41 } |
| 41 | 42 |
| 42 void NativeViewHost::Attach(gfx::NativeView native_view) { | 43 void NativeViewHost::Attach(gfx::NativeView native_view) { |
| 43 DCHECK(native_view); | 44 DCHECK(native_view); |
| 44 DCHECK(!native_view_); | 45 DCHECK(!native_view_); |
| 45 native_view_ = native_view; | 46 native_view_ = native_view; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 Widget::GetAllChildWidgets(native_view(), &widgets); | 222 Widget::GetAllChildWidgets(native_view(), &widgets); |
| 222 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { | 223 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { |
| 223 focus_manager->ViewRemoved((*i)->GetRootView()); | 224 focus_manager->ViewRemoved((*i)->GetRootView()); |
| 224 if (!focus_manager->GetFocusedView()) | 225 if (!focus_manager->GetFocusedView()) |
| 225 return; | 226 return; |
| 226 } | 227 } |
| 227 } | 228 } |
| 228 | 229 |
| 229 | 230 |
| 230 } // namespace views | 231 } // namespace views |
| OLD | NEW |