| 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/browser_window_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 #include "content/public/browser/render_widget_host_view.h" | 85 #include "content/public/browser/render_widget_host_view.h" |
| 86 #include "content/public/browser/web_contents.h" | 86 #include "content/public/browser/web_contents.h" |
| 87 #include "content/public/browser/web_contents_view.h" | 87 #include "content/public/browser/web_contents_view.h" |
| 88 #include "grit/chromium_strings.h" | 88 #include "grit/chromium_strings.h" |
| 89 #include "grit/generated_resources.h" | 89 #include "grit/generated_resources.h" |
| 90 #include "grit/theme_resources.h" | 90 #include "grit/theme_resources.h" |
| 91 #include "grit/theme_resources_standard.h" | 91 #include "grit/theme_resources_standard.h" |
| 92 #include "grit/ui_resources.h" | 92 #include "grit/ui_resources.h" |
| 93 #include "ui/base/gtk/gtk_floating_container.h" | 93 #include "ui/base/gtk/gtk_floating_container.h" |
| 94 #include "ui/base/gtk/gtk_hig_constants.h" | 94 #include "ui/base/gtk/gtk_hig_constants.h" |
| 95 #include "ui/base/gtk/gtk_screen_util.h" |
| 95 #include "ui/base/keycodes/keyboard_codes.h" | 96 #include "ui/base/keycodes/keyboard_codes.h" |
| 96 #include "ui/base/l10n/l10n_util.h" | 97 #include "ui/base/l10n/l10n_util.h" |
| 97 #include "ui/base/resource/resource_bundle.h" | 98 #include "ui/base/resource/resource_bundle.h" |
| 98 #include "ui/base/x/active_window_watcher_x.h" | 99 #include "ui/base/x/active_window_watcher_x.h" |
| 99 #include "ui/gfx/gtk_util.h" | 100 #include "ui/gfx/gtk_util.h" |
| 100 #include "ui/gfx/image/cairo_cached_surface.h" | 101 #include "ui/gfx/image/cairo_cached_surface.h" |
| 101 #include "ui/gfx/image/image.h" | 102 #include "ui/gfx/image/image.h" |
| 102 #include "ui/gfx/rect.h" | 103 #include "ui/gfx/rect.h" |
| 103 #include "ui/gfx/screen.h" | 104 #include "ui/gfx/screen.h" |
| 104 #include "ui/gfx/skia_utils_gtk.h" | 105 #include "ui/gfx/skia_utils_gtk.h" |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 contents_container_->SetPreview(preview); | 1234 contents_container_->SetPreview(preview); |
| 1234 MaybeShowBookmarkBar(false); | 1235 MaybeShowBookmarkBar(false); |
| 1235 } | 1236 } |
| 1236 | 1237 |
| 1237 void BrowserWindowGtk::HideInstant() { | 1238 void BrowserWindowGtk::HideInstant() { |
| 1238 contents_container_->PopPreview(); | 1239 contents_container_->PopPreview(); |
| 1239 MaybeShowBookmarkBar(false); | 1240 MaybeShowBookmarkBar(false); |
| 1240 } | 1241 } |
| 1241 | 1242 |
| 1242 gfx::Rect BrowserWindowGtk::GetInstantBounds() { | 1243 gfx::Rect BrowserWindowGtk::GetInstantBounds() { |
| 1243 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); | 1244 return ui::GetWidgetScreenBounds(contents_container_->widget()); |
| 1244 } | 1245 } |
| 1245 | 1246 |
| 1246 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( | 1247 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( |
| 1247 const gfx::Rect& bounds) { | 1248 const gfx::Rect& bounds) { |
| 1248 return NEW_POPUP; | 1249 return NEW_POPUP; |
| 1249 } | 1250 } |
| 1250 | 1251 |
| 1251 FindBar* BrowserWindowGtk::CreateFindBar() { | 1252 FindBar* BrowserWindowGtk::CreateFindBar() { |
| 1252 return new FindBarGtk(this); | 1253 return new FindBarGtk(this); |
| 1253 } | 1254 } |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2567 wm_type == ui::WM_OPENBOX || | 2568 wm_type == ui::WM_OPENBOX || |
| 2568 wm_type == ui::WM_XFWM4); | 2569 wm_type == ui::WM_XFWM4); |
| 2569 } | 2570 } |
| 2570 | 2571 |
| 2571 // static | 2572 // static |
| 2572 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2573 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2573 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2574 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2574 browser_window_gtk->Init(); | 2575 browser_window_gtk->Init(); |
| 2575 return browser_window_gtk; | 2576 return browser_window_gtk; |
| 2576 } | 2577 } |
| OLD | NEW |