OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/gtk/apps/native_app_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/apps/native_app_window_gtk.h" |
6 | 6 |
7 #include <gdk/gdkx.h> | 7 #include <gdk/gdkx.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop/message_pump_gtk.h" | 10 #include "base/message_loop/message_pump_gtk.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 gfx::Rect NativeAppWindowGtk::GetRestoredBounds() const { | 205 gfx::Rect NativeAppWindowGtk::GetRestoredBounds() const { |
206 gfx::Rect window_bounds = restored_bounds_; | 206 gfx::Rect window_bounds = restored_bounds_; |
207 window_bounds.Inset(-GetFrameInsets()); | 207 window_bounds.Inset(-GetFrameInsets()); |
208 return window_bounds; | 208 return window_bounds; |
209 } | 209 } |
210 | 210 |
211 ui::WindowShowState NativeAppWindowGtk::GetRestoredState() const { | 211 ui::WindowShowState NativeAppWindowGtk::GetRestoredState() const { |
212 if (IsMaximized()) | 212 if (IsMaximized()) |
213 return ui::SHOW_STATE_MAXIMIZED; | 213 return ui::SHOW_STATE_MAXIMIZED; |
| 214 if (IsFullscreen()) |
| 215 return ui::SHOW_STATE_FULLSCREEN; |
214 return ui::SHOW_STATE_NORMAL; | 216 return ui::SHOW_STATE_NORMAL; |
215 } | 217 } |
216 | 218 |
217 gfx::Rect NativeAppWindowGtk::GetBounds() const { | 219 gfx::Rect NativeAppWindowGtk::GetBounds() const { |
218 gfx::Rect window_bounds = bounds_; | 220 gfx::Rect window_bounds = bounds_; |
219 window_bounds.Inset(-GetFrameInsets()); | 221 window_bounds.Inset(-GetFrameInsets()); |
220 return window_bounds; | 222 return window_bounds; |
221 } | 223 } |
222 | 224 |
223 void NativeAppWindowGtk::Show() { | 225 void NativeAppWindowGtk::Show() { |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 } | 622 } |
621 | 623 |
622 void NativeAppWindowGtk::UpdateDraggableRegions( | 624 void NativeAppWindowGtk::UpdateDraggableRegions( |
623 const std::vector<extensions::DraggableRegion>& regions) { | 625 const std::vector<extensions::DraggableRegion>& regions) { |
624 // Draggable region is not supported for non-frameless window. | 626 // Draggable region is not supported for non-frameless window. |
625 if (!frameless_) | 627 if (!frameless_) |
626 return; | 628 return; |
627 | 629 |
628 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 630 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
629 } | 631 } |
OLD | NEW |