| 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/widget/widget_gtk.h" | 5 #include "views/widget/widget_gtk.h" |
| 6 | 6 |
| 7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
| 8 #include "app/gfx/path.h" | 8 #include "app/gfx/path.h" |
| 9 #include "app/os_exchange_data.h" | 9 #include "app/os_exchange_data.h" |
| 10 #include "app/os_exchange_data_provider_gtk.h" | 10 #include "app/os_exchange_data_provider_gtk.h" |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 442 } |
| 443 | 443 |
| 444 void WidgetGtk::CloseNow() { | 444 void WidgetGtk::CloseNow() { |
| 445 if (widget_) { | 445 if (widget_) { |
| 446 gtk_widget_destroy(widget_); | 446 gtk_widget_destroy(widget_); |
| 447 widget_ = NULL; | 447 widget_ = NULL; |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 | 450 |
| 451 void WidgetGtk::Show() { | 451 void WidgetGtk::Show() { |
| 452 if (widget_) | 452 if (widget_) { |
| 453 gtk_widget_show(widget_); | 453 gtk_widget_show(widget_); |
| 454 if (widget_->window) |
| 455 gdk_window_raise(widget_->window); |
| 456 } |
| 454 } | 457 } |
| 455 | 458 |
| 456 void WidgetGtk::Hide() { | 459 void WidgetGtk::Hide() { |
| 457 if (widget_) | 460 if (widget_) |
| 458 gtk_widget_hide(widget_); | 461 gtk_widget_hide(widget_); |
| 459 } | 462 } |
| 460 | 463 |
| 461 gfx::NativeView WidgetGtk::GetNativeView() const { | 464 gfx::NativeView WidgetGtk::GetNativeView() const { |
| 462 return widget_; | 465 return widget_; |
| 463 } | 466 } |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 | 1351 |
| 1349 // static | 1352 // static |
| 1350 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { | 1353 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { |
| 1351 gpointer raw_widget = g_object_get_data(G_OBJECT(native_window), kWidgetKey); | 1354 gpointer raw_widget = g_object_get_data(G_OBJECT(native_window), kWidgetKey); |
| 1352 if (raw_widget) | 1355 if (raw_widget) |
| 1353 return reinterpret_cast<Widget*>(raw_widget); | 1356 return reinterpret_cast<Widget*>(raw_widget); |
| 1354 return NULL; | 1357 return NULL; |
| 1355 } | 1358 } |
| 1356 | 1359 |
| 1357 } // namespace views | 1360 } // namespace views |
| OLD | NEW |