| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 void NativeAppWindowGtk::FlashFrame(bool flash) { | 224 void NativeAppWindowGtk::FlashFrame(bool flash) { |
| 225 gtk_window_set_urgency_hint(window_, flash); | 225 gtk_window_set_urgency_hint(window_, flash); |
| 226 } | 226 } |
| 227 | 227 |
| 228 bool NativeAppWindowGtk::IsAlwaysOnTop() const { | 228 bool NativeAppWindowGtk::IsAlwaysOnTop() const { |
| 229 return false; | 229 return false; |
| 230 } | 230 } |
| 231 | 231 |
| 232 void NativeAppWindowGtk::RenderViewHostChanged() { | 232 void NativeAppWindowGtk::RenderViewHostChanged() { |
| 233 web_contents()->Focus(); | 233 web_contents()->GetView()->Focus(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 gfx::Insets NativeAppWindowGtk::GetFrameInsets() const { | 236 gfx::Insets NativeAppWindowGtk::GetFrameInsets() const { |
| 237 if (frameless_) | 237 if (frameless_) |
| 238 return gfx::Insets(); | 238 return gfx::Insets(); |
| 239 GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window_)); | 239 GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(window_)); |
| 240 if (!gdk_window) | 240 if (!gdk_window) |
| 241 return gfx::Insets(); | 241 return gfx::Insets(); |
| 242 | 242 |
| 243 gint current_width = 0; | 243 gint current_width = 0; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 395 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
| 396 } | 396 } |
| 397 | 397 |
| 398 // static | 398 // static |
| 399 NativeAppWindow* NativeAppWindow::Create( | 399 NativeAppWindow* NativeAppWindow::Create( |
| 400 ShellWindow* shell_window, | 400 ShellWindow* shell_window, |
| 401 const ShellWindow::CreateParams& params) { | 401 const ShellWindow::CreateParams& params) { |
| 402 return new NativeAppWindowGtk(shell_window, params); | 402 return new NativeAppWindowGtk(shell_window, params); |
| 403 } | 403 } |
| OLD | NEW |