| 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/window/window_gtk.h" | 5 #include "views/window/window_gtk.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/gfx/rect.h" | 8 #include "base/gfx/rect.h" |
| 9 #include "views/window/custom_frame_view.h" | 9 #include "views/window/custom_frame_view.h" |
| 10 #include "views/window/non_client_view.h" | 10 #include "views/window/non_client_view.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 void WindowGtk::FrameTypeChanged() { | 183 void WindowGtk::FrameTypeChanged() { |
| 184 NOTIMPLEMENTED(); | 184 NOTIMPLEMENTED(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 WindowGtk::WindowGtk(WindowDelegate* window_delegate) | 187 WindowGtk::WindowGtk(WindowDelegate* window_delegate) |
| 188 : WidgetGtk(TYPE_WINDOW), | 188 : WidgetGtk(TYPE_WINDOW), |
| 189 is_modal_(false), | 189 is_modal_(false), |
| 190 window_delegate_(window_delegate), | 190 window_delegate_(window_delegate), |
| 191 non_client_view_(new NonClientView(this)), | 191 non_client_view_(new NonClientView(this)), |
| 192 window_state_(GDK_WINDOW_STATE_WITHDRAWN), |
| 192 window_closed_(false) { | 193 window_closed_(false) { |
| 193 is_window_ = true; | 194 is_window_ = true; |
| 194 window_delegate_->window_.reset(this); | 195 window_delegate_->window_.reset(this); |
| 195 } | 196 } |
| 196 | 197 |
| 197 void WindowGtk::Init(const gfx::Rect& bounds) { | 198 void WindowGtk::Init(const gfx::Rect& bounds) { |
| 198 // We call this after initializing our members since our implementations of | 199 // We call this after initializing our members since our implementations of |
| 199 // assorted WidgetWin functions may be called during initialization. | 200 // assorted WidgetWin functions may be called during initialization. |
| 200 is_modal_ = window_delegate_->IsModal(); | 201 is_modal_ = window_delegate_->IsModal(); |
| 201 if (is_modal_) { | 202 if (is_modal_) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 259 } |
| 259 | 260 |
| 260 // static | 261 // static |
| 261 void WindowGtk::CallWindowStateEvent(GtkWidget* widget, | 262 void WindowGtk::CallWindowStateEvent(GtkWidget* widget, |
| 262 GdkEventWindowState* window_state) { | 263 GdkEventWindowState* window_state) { |
| 263 WindowGtk* window_gtk = GetWindowForNative(widget); | 264 WindowGtk* window_gtk = GetWindowForNative(widget); |
| 264 window_gtk->window_state_ = window_state->new_window_state; | 265 window_gtk->window_state_ = window_state->new_window_state; |
| 265 } | 266 } |
| 266 | 267 |
| 267 } // namespace views | 268 } // namespace views |
| OLD | NEW |