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/shell_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/extensions/shell_window_gtk.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/platform_app_host.h" |
8 #include "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
9 #include "content/public/browser/render_widget_host_view.h" | 9 #include "content/public/browser/render_widget_host_view.h" |
10 #include "ui/base/x/active_window_watcher_x.h" | 10 #include "ui/base/x/active_window_watcher_x.h" |
11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
12 | 12 |
13 ShellWindowGtk::ShellWindowGtk(ExtensionHost* host) | 13 ShellWindowGtk::ShellWindowGtk(PlatformAppHost* host) |
14 : ShellWindow(host), | 14 : ShellWindow(host), |
15 state_(GDK_WINDOW_STATE_WITHDRAWN), | 15 state_(GDK_WINDOW_STATE_WITHDRAWN), |
16 is_active_(!ui::ActiveWindowWatcherX::WMSupportsActivation()) { | 16 is_active_(!ui::ActiveWindowWatcherX::WMSupportsActivation()) { |
17 host_->view()->SetContainer(this); | 17 host_->view()->SetContainer(this); |
18 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); | 18 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); |
19 | 19 |
20 gtk_container_add(GTK_CONTAINER(window_), host_->view()->native_view()); | 20 gtk_container_add(GTK_CONTAINER(window_), host_->view()->native_view()); |
21 | 21 |
22 const Extension* extension = host_->extension(); | 22 const Extension* extension = host_->extension(); |
23 | 23 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return FALSE; | 179 return FALSE; |
180 } | 180 } |
181 | 181 |
182 gboolean ShellWindowGtk::OnWindowState(GtkWidget* sender, | 182 gboolean ShellWindowGtk::OnWindowState(GtkWidget* sender, |
183 GdkEventWindowState* event) { | 183 GdkEventWindowState* event) { |
184 state_ = event->new_window_state; | 184 state_ = event->new_window_state; |
185 return FALSE; | 185 return FALSE; |
186 } | 186 } |
187 | 187 |
188 // static | 188 // static |
189 ShellWindow* ShellWindow::CreateShellWindow(ExtensionHost* host) { | 189 ShellWindow* ShellWindow::CreateShellWindow(PlatformAppHost* host) { |
190 return new ShellWindowGtk(host); | 190 return new ShellWindowGtk(host); |
191 } | 191 } |
OLD | NEW |