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/window/window_gtk.h" | 5 #include "views/window/window_gtk.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "ui/gfx/gtk_util.h" | 9 #include "ui/gfx/gtk_util.h" |
10 #include "ui/gfx/path.h" | 10 #include "ui/gfx/path.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 bool WindowGtk::ShouldUseNativeFrame() const { | 262 bool WindowGtk::ShouldUseNativeFrame() const { |
263 return false; | 263 return false; |
264 } | 264 } |
265 | 265 |
266 void WindowGtk::FrameTypeChanged() { | 266 void WindowGtk::FrameTypeChanged() { |
267 // This is called when the Theme has changed, so forward the event to the root | 267 // This is called when the Theme has changed, so forward the event to the root |
268 // widget. | 268 // widget. |
269 ThemeChanged(); | 269 ThemeChanged(); |
270 } | 270 } |
271 | 271 |
| 272 Window* WindowGtk::AsWindow() { |
| 273 return this; |
| 274 } |
| 275 |
| 276 const Window* WindowGtk::AsWindow() const { |
| 277 return this; |
| 278 } |
| 279 |
272 //////////////////////////////////////////////////////////////////////////////// | 280 //////////////////////////////////////////////////////////////////////////////// |
273 // WindowGtk, WidgetGtk overrides: | 281 // WindowGtk, WidgetGtk overrides: |
274 | 282 |
275 gboolean WindowGtk::OnButtonPress(GtkWidget* widget, GdkEventButton* event) { | 283 gboolean WindowGtk::OnButtonPress(GtkWidget* widget, GdkEventButton* event) { |
276 int x = 0, y = 0; | 284 int x = 0, y = 0; |
277 GetContainedWidgetEventCoordinates(event, &x, &y); | 285 GetContainedWidgetEventCoordinates(event, &x, &y); |
278 | 286 |
279 int hittest_code = | 287 int hittest_code = |
280 non_client_view_->NonClientHitTest(gfx::Point(x, y)); | 288 non_client_view_->NonClientHitTest(gfx::Point(x, y)); |
281 switch (hittest_code) { | 289 switch (hittest_code) { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 } | 505 } |
498 | 506 |
499 void WindowGtk::OnDestroy(GtkWidget* widget) { | 507 void WindowGtk::OnDestroy(GtkWidget* widget) { |
500 non_client_view_->WindowClosing(); | 508 non_client_view_->WindowClosing(); |
501 WidgetGtk::OnDestroy(widget); | 509 WidgetGtk::OnDestroy(widget); |
502 window_delegate_->DeleteDelegate(); | 510 window_delegate_->DeleteDelegate(); |
503 window_delegate_ = NULL; | 511 window_delegate_ = NULL; |
504 } | 512 } |
505 | 513 |
506 } // namespace views | 514 } // namespace views |
OLD | NEW |