OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/native_app_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/extensions/native_app_window_gtk.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h" | 9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h" |
10 #include "chrome/browser/ui/gtk/gtk_util.h" | 10 #include "chrome/browser/ui/gtk/gtk_util.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 bool NativeAppWindowGtk::IsFullscreen() const { | 159 bool NativeAppWindowGtk::IsFullscreen() const { |
160 return (state_ & GDK_WINDOW_STATE_FULLSCREEN); | 160 return (state_ & GDK_WINDOW_STATE_FULLSCREEN); |
161 } | 161 } |
162 | 162 |
163 gfx::NativeWindow NativeAppWindowGtk::GetNativeWindow() { | 163 gfx::NativeWindow NativeAppWindowGtk::GetNativeWindow() { |
164 return window_; | 164 return window_; |
165 } | 165 } |
166 | 166 |
167 gfx::Rect NativeAppWindowGtk::GetRestoredBounds() const { | 167 gfx::Rect NativeAppWindowGtk::GetRestoredBounds() const { |
168 gfx::Rect window_bounds = restored_bounds_; | 168 return restored_bounds_; |
169 window_bounds.Inset(-GetFrameInsets()); | |
170 return window_bounds; | |
171 } | 169 } |
172 | 170 |
173 gfx::Rect NativeAppWindowGtk::GetBounds() const { | 171 gfx::Rect NativeAppWindowGtk::GetBounds() const { |
174 gfx::Rect window_bounds = bounds_; | 172 gfx::Rect window_bounds = bounds_; |
175 window_bounds.Inset(-GetFrameInsets()); | 173 window_bounds.Inset(-GetFrameInsets()); |
176 return window_bounds; | 174 return window_bounds; |
177 } | 175 } |
178 | 176 |
179 void NativeAppWindowGtk::Show() { | 177 void NativeAppWindowGtk::Show() { |
180 gtk_window_present(window_); | 178 gtk_window_present(window_); |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 510 |
513 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 511 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
514 } | 512 } |
515 | 513 |
516 // static | 514 // static |
517 NativeAppWindow* NativeAppWindow::Create( | 515 NativeAppWindow* NativeAppWindow::Create( |
518 ShellWindow* shell_window, | 516 ShellWindow* shell_window, |
519 const ShellWindow::CreateParams& params) { | 517 const ShellWindow::CreateParams& params) { |
520 return new NativeAppWindowGtk(shell_window, params); | 518 return new NativeAppWindowGtk(shell_window, params); |
521 } | 519 } |
OLD | NEW |