| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 installed_clip_(false), | 105 installed_clip_(false), |
| 106 destroy_signal_id_(0), | 106 destroy_signal_id_(0), |
| 107 focus_signal_id_(0), | 107 focus_signal_id_(0), |
| 108 fixed_(NULL) { | 108 fixed_(NULL) { |
| 109 CreateFixed(false); | 109 CreateFixed(false); |
| 110 } | 110 } |
| 111 | 111 |
| 112 NativeViewHostGtk::~NativeViewHostGtk() { | 112 NativeViewHostGtk::~NativeViewHostGtk() { |
| 113 if (fixed_) { | 113 if (fixed_) { |
| 114 gtk_container_foreach(GTK_CONTAINER(fixed_), RemoveFromParent, fixed_); | 114 gtk_container_foreach(GTK_CONTAINER(fixed_), RemoveFromParent, fixed_); |
| 115 gtk_widget_destroy(fixed_); | 115 DestroyFixed(); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 //////////////////////////////////////////////////////////////////////////////// | 119 //////////////////////////////////////////////////////////////////////////////// |
| 120 // NativeViewHostGtk, NativeViewHostWrapper implementation: | 120 // NativeViewHostGtk, NativeViewHostWrapper implementation: |
| 121 | 121 |
| 122 void NativeViewHostGtk::NativeViewAttached() { | 122 void NativeViewHostGtk::NativeViewAttached() { |
| 123 AttachHostWidget(); | 123 AttachHostWidget(); |
| 124 | 124 |
| 125 GtkWidget* host_widget = host_->native_view(); | 125 GtkWidget* host_widget = host_->native_view(); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // static | 404 // static |
| 405 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( | 405 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( |
| 406 NativeViewHost* host) { | 406 NativeViewHost* host) { |
| 407 if (Widget::IsPureViews() && | 407 if (Widget::IsPureViews() && |
| 408 views::ViewsDelegate::views_delegate->GetDefaultParentView()) | 408 views::ViewsDelegate::views_delegate->GetDefaultParentView()) |
| 409 return new NativeViewHostViews(host); | 409 return new NativeViewHostViews(host); |
| 410 return new NativeViewHostGtk(host); | 410 return new NativeViewHostGtk(host); |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace views | 413 } // namespace views |
| OLD | NEW |