| 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_gtk.h" | 5 #include "views/controls/native/native_view_host_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "views/controls/native/native_view_host.h" | 10 #include "views/controls/native/native_view_host.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 // Set the parent. | 66 // Set the parent. |
| 67 static_cast<WidgetGtk*>(host_->GetWidget())->AddChild(host_->native_view()); | 67 static_cast<WidgetGtk*>(host_->GetWidget())->AddChild(host_->native_view()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 // Always layout though. | 70 // Always layout though. |
| 71 host_->Layout(); | 71 host_->Layout(); |
| 72 | 72 |
| 73 // TODO(port): figure out focus. | 73 // TODO(port): figure out focus. |
| 74 // FocusManager::InstallFocusSubclass( | |
| 75 // hwnd, associated_focus_view()_ ? associated_focus_view() : this); | |
| 76 } | 74 } |
| 77 | 75 |
| 78 void NativeViewHostGtk::NativeViewDetaching() { | 76 void NativeViewHostGtk::NativeViewDetaching() { |
| 79 DCHECK(host_->native_view()); | 77 DCHECK(host_->native_view()); |
| 80 | 78 |
| 81 g_signal_handler_disconnect(G_OBJECT(host_->native_view()), | 79 g_signal_handler_disconnect(G_OBJECT(host_->native_view()), |
| 82 destroy_signal_id_); | 80 destroy_signal_id_); |
| 83 destroy_signal_id_ = 0; | 81 destroy_signal_id_ = 0; |
| 84 | 82 |
| 85 // TODO(port): focus. | 83 // TODO(port): focus. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 //////////////////////////////////////////////////////////////////////////////// | 185 //////////////////////////////////////////////////////////////////////////////// |
| 188 // NativeViewHostWrapper, public: | 186 // NativeViewHostWrapper, public: |
| 189 | 187 |
| 190 // static | 188 // static |
| 191 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( | 189 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( |
| 192 NativeViewHost* host) { | 190 NativeViewHost* host) { |
| 193 return new NativeViewHostGtk(host); | 191 return new NativeViewHostGtk(host); |
| 194 } | 192 } |
| 195 | 193 |
| 196 } // namespace views | 194 } // namespace views |
| OLD | NEW |