OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "views/controls/native/native_view_host.h" | 5 #include "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 "views/controls/native/native_view_host_wrapper.h" | 9 #include "views/controls/native/native_view_host_wrapper.h" |
10 #include "views/controls/native/native_view_host_views.h" | 10 #include "views/controls/native/native_view_host_views.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 views::NativeWidget* native_widget = | 193 views::NativeWidget* native_widget = |
194 views::NativeWidget::GetNativeWidgetForNativeView(native_view_); | 194 views::NativeWidget::GetNativeWidgetForNativeView(native_view_); |
195 if (native_widget && | 195 if (native_widget && |
196 native_widget->GetWidget()->ContainsNativeView(native_view)) { | 196 native_widget->GetWidget()->ContainsNativeView(native_view)) { |
197 return true; | 197 return true; |
198 } | 198 } |
199 | 199 |
200 return View::ContainsNativeView(native_view); | 200 return View::ContainsNativeView(native_view); |
201 } | 201 } |
202 | 202 |
| 203 gfx::NativeViewAccessible NativeViewHost::GetNativeViewAccessible() { |
| 204 if (native_wrapper_.get()) { |
| 205 gfx::NativeViewAccessible accessible_view = |
| 206 native_wrapper_->GetNativeViewAccessible(); |
| 207 if (accessible_view) |
| 208 return accessible_view; |
| 209 } |
| 210 |
| 211 return View::GetNativeViewAccessible(); |
| 212 } |
| 213 |
203 //////////////////////////////////////////////////////////////////////////////// | 214 //////////////////////////////////////////////////////////////////////////////// |
204 // NativeViewHost, private: | 215 // NativeViewHost, private: |
205 | 216 |
206 void NativeViewHost::Detach(bool destroyed) { | 217 void NativeViewHost::Detach(bool destroyed) { |
207 DCHECK(native_view_ || views_view_); | 218 DCHECK(native_view_ || views_view_); |
208 native_wrapper_->NativeViewDetaching(destroyed); | 219 native_wrapper_->NativeViewDetaching(destroyed); |
209 native_view_ = NULL; | 220 native_view_ = NULL; |
210 views_view_ = NULL; | 221 views_view_ = NULL; |
211 } | 222 } |
212 | 223 |
213 } // namespace views | 224 } // namespace views |
OLD | NEW |