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::NativeAccessibleView NativeViewHost::GetNativeAccessibleView() { | |
204 gfx::NativeAccessibleView accessible_view = | |
Chris Guillory
2011/06/10 19:10:09
Do we need to verify native_wrapper_.get()?
dmazzoni
2011/06/10 22:38:40
Done.
| |
205 native_wrapper_->GetNativeAccessibleView(); | |
206 if (accessible_view) | |
207 return accessible_view; | |
208 | |
209 return View::GetNativeAccessibleView(); | |
210 } | |
211 | |
203 //////////////////////////////////////////////////////////////////////////////// | 212 //////////////////////////////////////////////////////////////////////////////// |
204 // NativeViewHost, private: | 213 // NativeViewHost, private: |
205 | 214 |
206 void NativeViewHost::Detach(bool destroyed) { | 215 void NativeViewHost::Detach(bool destroyed) { |
207 DCHECK(native_view_ || views_view_); | 216 DCHECK(native_view_ || views_view_); |
208 native_wrapper_->NativeViewDetaching(destroyed); | 217 native_wrapper_->NativeViewDetaching(destroyed); |
209 native_view_ = NULL; | 218 native_view_ = NULL; |
210 views_view_ = NULL; | 219 views_view_ = NULL; |
211 } | 220 } |
212 | 221 |
213 } // namespace views | 222 } // namespace views |
OLD | NEW |