| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 #include "ui/gfx/gtk_util.h" | 105 #include "ui/gfx/gtk_util.h" |
| 106 #include "ui/gfx/image/cairo_cached_surface.h" | 106 #include "ui/gfx/image/cairo_cached_surface.h" |
| 107 #include "ui/gfx/image/image.h" | 107 #include "ui/gfx/image/image.h" |
| 108 #include "ui/gfx/rect.h" | 108 #include "ui/gfx/rect.h" |
| 109 #include "ui/gfx/screen.h" | 109 #include "ui/gfx/screen.h" |
| 110 #include "ui/gfx/skia_utils_gtk.h" | 110 #include "ui/gfx/skia_utils_gtk.h" |
| 111 | 111 |
| 112 using content::NativeWebKeyboardEvent; | 112 using content::NativeWebKeyboardEvent; |
| 113 using content::SSLStatus; | 113 using content::SSLStatus; |
| 114 using content::WebContents; | 114 using content::WebContents; |
| 115 using web_modal::WebContentsModalDialogHost; |
| 115 | 116 |
| 116 namespace { | 117 namespace { |
| 117 | 118 |
| 118 // The number of milliseconds between loading animation frames. | 119 // The number of milliseconds between loading animation frames. |
| 119 const int kLoadingAnimationFrameTimeMs = 30; | 120 const int kLoadingAnimationFrameTimeMs = 30; |
| 120 | 121 |
| 121 const char* kBrowserWindowKey = "__BROWSER_WINDOW_GTK__"; | 122 const char* kBrowserWindowKey = "__BROWSER_WINDOW_GTK__"; |
| 122 | 123 |
| 123 // While resize areas on Windows are normally the same size as the window | 124 // While resize areas on Windows are normally the same size as the window |
| 124 // borders, our top area is shrunk by 1 px to make it easier to move the window | 125 // borders, our top area is shrunk by 1 px to make it easier to move the window |
| (...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 wm_type == ui::WM_OPENBOX || | 2404 wm_type == ui::WM_OPENBOX || |
| 2404 wm_type == ui::WM_XFWM4); | 2405 wm_type == ui::WM_XFWM4); |
| 2405 } | 2406 } |
| 2406 | 2407 |
| 2407 // static | 2408 // static |
| 2408 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2409 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2409 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2410 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2410 browser_window_gtk->Init(); | 2411 browser_window_gtk->Init(); |
| 2411 return browser_window_gtk; | 2412 return browser_window_gtk; |
| 2412 } | 2413 } |
| OLD | NEW |