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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 window_bounds.Inset(-GetFrameInsets()); | 169 window_bounds.Inset(-GetFrameInsets()); |
170 return window_bounds; | 170 return window_bounds; |
171 } | 171 } |
172 | 172 |
173 gfx::Rect NativeAppWindowGtk::GetBounds() const { | 173 gfx::Rect NativeAppWindowGtk::GetBounds() const { |
174 gfx::Rect window_bounds = bounds_; | 174 gfx::Rect window_bounds = bounds_; |
175 window_bounds.Inset(-GetFrameInsets()); | 175 window_bounds.Inset(-GetFrameInsets()); |
176 return window_bounds; | 176 return window_bounds; |
177 } | 177 } |
178 | 178 |
| 179 gfx::Rect NativeAppWindowGtk::GetContentBounds() const { |
| 180 return bounds_; |
| 181 } |
| 182 |
179 void NativeAppWindowGtk::Show() { | 183 void NativeAppWindowGtk::Show() { |
180 gtk_window_present(window_); | 184 gtk_window_present(window_); |
181 } | 185 } |
182 | 186 |
183 void NativeAppWindowGtk::ShowInactive() { | 187 void NativeAppWindowGtk::ShowInactive() { |
184 gtk_window_set_focus_on_map(window_, false); | 188 gtk_window_set_focus_on_map(window_, false); |
185 gtk_widget_show(GTK_WIDGET(window_)); | 189 gtk_widget_show(GTK_WIDGET(window_)); |
186 } | 190 } |
187 | 191 |
188 void NativeAppWindowGtk::Hide() { | 192 void NativeAppWindowGtk::Hide() { |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 494 |
491 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 495 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
492 } | 496 } |
493 | 497 |
494 // static | 498 // static |
495 NativeAppWindow* NativeAppWindow::Create( | 499 NativeAppWindow* NativeAppWindow::Create( |
496 ShellWindow* shell_window, | 500 ShellWindow* shell_window, |
497 const ShellWindow::CreateParams& params) { | 501 const ShellWindow::CreateParams& params) { |
498 return new NativeAppWindowGtk(shell_window, params); | 502 return new NativeAppWindowGtk(shell_window, params); |
499 } | 503 } |
OLD | NEW |