| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/window/window_gtk.h" | 5 #include "views/window/window_gtk.h" |
| 6 | 6 |
| 7 #include "gfx/rect.h" | 7 #include "gfx/rect.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "gfx/path.h" | 10 #include "gfx/path.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 123 } |
| 124 | 124 |
| 125 void WindowGtk::HideWindow() { | 125 void WindowGtk::HideWindow() { |
| 126 Hide(); | 126 Hide(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void WindowGtk::Activate() { | 129 void WindowGtk::Activate() { |
| 130 gtk_window_present(GTK_WINDOW(GetNativeView())); | 130 gtk_window_present(GTK_WINDOW(GetNativeView())); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void WindowGtk::Deactivate() { |
| 134 // TODO(jcivelli): http://crbug.com/51364 Implement me. |
| 135 } |
| 136 |
| 133 void WindowGtk::Close() { | 137 void WindowGtk::Close() { |
| 134 if (window_closed_) { | 138 if (window_closed_) { |
| 135 // Don't do anything if we've already been closed. | 139 // Don't do anything if we've already been closed. |
| 136 return; | 140 return; |
| 137 } | 141 } |
| 138 | 142 |
| 139 if (non_client_view_->CanClose()) { | 143 if (non_client_view_->CanClose()) { |
| 140 WidgetGtk::Close(); | 144 WidgetGtk::Close(); |
| 141 window_closed_ = true; | 145 window_closed_ = true; |
| 142 } | 146 } |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 size.width(), size.height()); | 487 size.width(), size.height()); |
| 484 SetBounds(bounds, NULL); | 488 SetBounds(bounds, NULL); |
| 485 } | 489 } |
| 486 | 490 |
| 487 void WindowGtk::OnDestroy(GtkWidget* widget) { | 491 void WindowGtk::OnDestroy(GtkWidget* widget) { |
| 488 non_client_view_->WindowClosing(); | 492 non_client_view_->WindowClosing(); |
| 489 WidgetGtk::OnDestroy(widget); | 493 WidgetGtk::OnDestroy(widget); |
| 490 } | 494 } |
| 491 | 495 |
| 492 } // namespace views | 496 } // namespace views |
| OLD | NEW |