| 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/native_window_gtk.h" | 5 #include "views/window/native_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" |
| 11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 12 #include "views/events/event.h" | 12 #include "views/events/event.h" |
| 13 #include "views/screen.h" | 13 #include "views/screen.h" |
| 14 #include "views/window/custom_frame_view.h" | |
| 15 #include "views/window/hit_test.h" | 14 #include "views/window/hit_test.h" |
| 16 #include "views/window/native_window_delegate.h" | 15 #include "views/window/native_window_delegate.h" |
| 17 #include "views/window/non_client_view.h" | 16 #include "views/window/non_client_view.h" |
| 18 #include "views/window/window_delegate.h" | 17 #include "views/window/window_delegate.h" |
| 19 | 18 |
| 20 namespace { | 19 namespace { |
| 21 | 20 |
| 22 // Converts a Windows-style hit test result code into a GDK window edge. | 21 // Converts a Windows-style hit test result code into a GDK window edge. |
| 23 GdkWindowEdge HitTestCodeToGDKWindowEdge(int hittest_code) { | 22 GdkWindowEdge HitTestCodeToGDKWindowEdge(int hittest_code) { |
| 24 switch (hittest_code) { | 23 switch (hittest_code) { |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 356 |
| 358 bool NativeWindowGtk::IsFullscreen() const { | 357 bool NativeWindowGtk::IsFullscreen() const { |
| 359 return window_state_ & GDK_WINDOW_STATE_FULLSCREEN; | 358 return window_state_ & GDK_WINDOW_STATE_FULLSCREEN; |
| 360 } | 359 } |
| 361 | 360 |
| 362 void NativeWindowGtk::SetUseDragFrame(bool use_drag_frame) { | 361 void NativeWindowGtk::SetUseDragFrame(bool use_drag_frame) { |
| 363 NOTIMPLEMENTED(); | 362 NOTIMPLEMENTED(); |
| 364 } | 363 } |
| 365 | 364 |
| 366 NonClientFrameView* NativeWindowGtk::CreateFrameViewForWindow() { | 365 NonClientFrameView* NativeWindowGtk::CreateFrameViewForWindow() { |
| 367 return new CustomFrameView(delegate_->AsWindow()); | 366 return NULL; |
| 368 } | 367 } |
| 369 | 368 |
| 370 void NativeWindowGtk::SetAlwaysOnTop(bool always_on_top) { | 369 void NativeWindowGtk::SetAlwaysOnTop(bool always_on_top) { |
| 371 gtk_window_set_keep_above(GetNativeWindow(), always_on_top); | 370 gtk_window_set_keep_above(GetNativeWindow(), always_on_top); |
| 372 } | 371 } |
| 373 | 372 |
| 374 void NativeWindowGtk::UpdateFrameAfterFrameChange() { | 373 void NativeWindowGtk::UpdateFrameAfterFrameChange() { |
| 375 // We currently don't support different frame types on Gtk, so we don't | 374 // We currently don't support different frame types on Gtk, so we don't |
| 376 // need to implement this. | 375 // need to implement this. |
| 377 NOTIMPLEMENTED(); | 376 NOTIMPLEMENTED(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 // NativeWindow, public: | 429 // NativeWindow, public: |
| 431 | 430 |
| 432 // static | 431 // static |
| 433 NativeWindow* NativeWindow::CreateNativeWindow( | 432 NativeWindow* NativeWindow::CreateNativeWindow( |
| 434 internal::NativeWindowDelegate* delegate) { | 433 internal::NativeWindowDelegate* delegate) { |
| 435 return new NativeWindowGtk(delegate); | 434 return new NativeWindowGtk(delegate); |
| 436 } | 435 } |
| 437 | 436 |
| 438 } // namespace views | 437 } // namespace views |
| 439 | 438 |
| OLD | NEW |