| 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/strings/utf_string_conversions.h" | 7 #include "base/strings/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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 286 |
| 287 int left_inset = current_x - rect_with_decorations.x; | 287 int left_inset = current_x - rect_with_decorations.x; |
| 288 int top_inset = current_y - rect_with_decorations.y; | 288 int top_inset = current_y - rect_with_decorations.y; |
| 289 return gfx::Insets( | 289 return gfx::Insets( |
| 290 top_inset, | 290 top_inset, |
| 291 left_inset, | 291 left_inset, |
| 292 rect_with_decorations.height - current_height - top_inset, | 292 rect_with_decorations.height - current_height - top_inset, |
| 293 rect_with_decorations.width - current_width - left_inset); | 293 rect_with_decorations.width - current_width - left_inset); |
| 294 } | 294 } |
| 295 | 295 |
| 296 gfx::Rect NativeAppWindowGtk::GetWindowWorkArea() const { |
| 297 NOTIMPLEMENTED(); |
| 298 return gfx::Rect(); |
| 299 } |
| 300 |
| 296 gfx::NativeView NativeAppWindowGtk::GetHostView() const { | 301 gfx::NativeView NativeAppWindowGtk::GetHostView() const { |
| 297 NOTIMPLEMENTED(); | 302 NOTIMPLEMENTED(); |
| 298 return NULL; | 303 return NULL; |
| 299 } | 304 } |
| 300 | 305 |
| 301 gfx::Point NativeAppWindowGtk::GetDialogPosition(const gfx::Size& size) { | 306 gfx::Point NativeAppWindowGtk::GetDialogPosition(const gfx::Size& size) { |
| 302 gint current_width = 0; | 307 gint current_width = 0; |
| 303 gint current_height = 0; | 308 gint current_height = 0; |
| 304 gtk_window_get_size(window_, ¤t_width, ¤t_height); | 309 gtk_window_get_size(window_, ¤t_width, ¤t_height); |
| 305 return gfx::Point(current_width / 2 - size.width() / 2, | 310 return gfx::Point(current_width / 2 - size.width() / 2, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 534 |
| 530 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 535 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
| 531 } | 536 } |
| 532 | 537 |
| 533 // static | 538 // static |
| 534 NativeAppWindow* NativeAppWindow::Create( | 539 NativeAppWindow* NativeAppWindow::Create( |
| 535 ShellWindow* shell_window, | 540 ShellWindow* shell_window, |
| 536 const ShellWindow::CreateParams& params) { | 541 const ShellWindow::CreateParams& params) { |
| 537 return new NativeAppWindowGtk(shell_window, params); | 542 return new NativeAppWindowGtk(shell_window, params); |
| 538 } | 543 } |
| OLD | NEW |