| 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" |
| 11 #include "chrome/browser/ui/gtk/gtk_window_util.h" | 11 #include "chrome/browser/ui/gtk/gtk_window_util.h" |
| 12 #include "chrome/browser/web_applications/web_app.h" | 12 #include "chrome/browser/web_applications/web_app.h" |
| 13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
| 14 #include "content/public/browser/render_view_host.h" | 14 #include "content/public/browser/render_view_host.h" |
| 15 #include "content/public/browser/render_widget_host_view.h" | 15 #include "content/public/browser/render_widget_host_view.h" |
| 16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 17 #include "content/public/browser/web_contents_view.h" | 17 #include "content/public/browser/web_contents_view.h" |
| 18 #include "ui/base/x/active_window_watcher_x.h" | 18 #include "ui/base/x/active_window_watcher_x.h" |
| 19 #include "ui/gfx/gtk_util.h" | 19 #include "ui/gfx/gtk_util.h" |
| 20 #include "ui/gfx/image/image.h" | 20 #include "ui/gfx/image/image.h" |
| 21 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
| 22 | 22 |
| 23 using apps::ShellWindow; |
| 24 |
| 23 namespace { | 25 namespace { |
| 24 | 26 |
| 25 // The timeout in milliseconds before we'll get the true window position with | 27 // The timeout in milliseconds before we'll get the true window position with |
| 26 // gtk_window_get_position() after the last GTK configure-event signal. | 28 // gtk_window_get_position() after the last GTK configure-event signal. |
| 27 const int kDebounceTimeoutMilliseconds = 100; | 29 const int kDebounceTimeoutMilliseconds = 100; |
| 28 | 30 |
| 29 } // namespace | 31 } // namespace |
| 30 | 32 |
| 31 NativeAppWindowGtk::NativeAppWindowGtk(ShellWindow* shell_window, | 33 NativeAppWindowGtk::NativeAppWindowGtk(ShellWindow* shell_window, |
| 32 const ShellWindow::CreateParams& params) | 34 const ShellWindow::CreateParams& params) |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 531 |
| 530 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 532 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
| 531 } | 533 } |
| 532 | 534 |
| 533 // static | 535 // static |
| 534 NativeAppWindow* NativeAppWindow::Create( | 536 NativeAppWindow* NativeAppWindow::Create( |
| 535 ShellWindow* shell_window, | 537 ShellWindow* shell_window, |
| 536 const ShellWindow::CreateParams& params) { | 538 const ShellWindow::CreateParams& params) { |
| 537 return new NativeAppWindowGtk(shell_window, params); | 539 return new NativeAppWindowGtk(shell_window, params); |
| 538 } | 540 } |
| OLD | NEW |