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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 | 150 |
151 bool NativeAppWindowGtk::IsMaximized() const { | 151 bool NativeAppWindowGtk::IsMaximized() const { |
152 return (state_ & GDK_WINDOW_STATE_MAXIMIZED); | 152 return (state_ & GDK_WINDOW_STATE_MAXIMIZED); |
153 } | 153 } |
154 | 154 |
155 bool NativeAppWindowGtk::IsMinimized() const { | 155 bool NativeAppWindowGtk::IsMinimized() const { |
156 return (state_ & GDK_WINDOW_STATE_ICONIFIED); | 156 return (state_ & GDK_WINDOW_STATE_ICONIFIED); |
157 } | 157 } |
158 | 158 |
159 bool NativeAppWindowGtk::IsFullscreen() const { | 159 bool NativeAppWindowGtk::IsFullscreen() const { |
160 return false; | 160 return state_ & GDK_WINDOW_STATE_FULLSCREEN; |
jeremya
2013/04/05 20:00:35
nit: the functions above have parens around the &,
scheib
2013/04/05 21:47:52
Done.
| |
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 gfx::Rect window_bounds = restored_bounds_; |
169 window_bounds.Inset(-GetFrameInsets()); | 169 window_bounds.Inset(-GetFrameInsets()); |
170 return window_bounds; | 170 return window_bounds; |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
490 | 490 |
491 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 491 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
492 } | 492 } |
493 | 493 |
494 // static | 494 // static |
495 NativeAppWindow* NativeAppWindow::Create( | 495 NativeAppWindow* NativeAppWindow::Create( |
496 ShellWindow* shell_window, | 496 ShellWindow* shell_window, |
497 const ShellWindow::CreateParams& params) { | 497 const ShellWindow::CreateParams& params) { |
498 return new NativeAppWindowGtk(shell_window, params); | 498 return new NativeAppWindowGtk(shell_window, params); |
499 } | 499 } |
OLD | NEW |