| 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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 contents_container_->SetPreview(preview); | 1230 contents_container_->SetPreview(preview); |
| 1230 MaybeShowBookmarkBar(false); | 1231 MaybeShowBookmarkBar(false); |
| 1231 } | 1232 } |
| 1232 | 1233 |
| 1233 void BrowserWindowGtk::HideInstant() { | 1234 void BrowserWindowGtk::HideInstant() { |
| 1234 contents_container_->PopPreview(); | 1235 contents_container_->PopPreview(); |
| 1235 MaybeShowBookmarkBar(false); | 1236 MaybeShowBookmarkBar(false); |
| 1236 } | 1237 } |
| 1237 | 1238 |
| 1238 gfx::Rect BrowserWindowGtk::GetInstantBounds() { | 1239 gfx::Rect BrowserWindowGtk::GetInstantBounds() { |
| 1239 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); | 1240 return ui::GetWidgetScreenBounds(contents_container_->widget()); |
| 1240 } | 1241 } |
| 1241 | 1242 |
| 1242 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( | 1243 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( |
| 1243 const gfx::Rect& bounds) { | 1244 const gfx::Rect& bounds) { |
| 1244 return NEW_POPUP; | 1245 return NEW_POPUP; |
| 1245 } | 1246 } |
| 1246 | 1247 |
| 1247 FindBar* BrowserWindowGtk::CreateFindBar() { | 1248 FindBar* BrowserWindowGtk::CreateFindBar() { |
| 1248 return new FindBarGtk(this); | 1249 return new FindBarGtk(this); |
| 1249 } | 1250 } |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 wm_type == ui::WM_OPENBOX || | 2564 wm_type == ui::WM_OPENBOX || |
| 2564 wm_type == ui::WM_XFWM4); | 2565 wm_type == ui::WM_XFWM4); |
| 2565 } | 2566 } |
| 2566 | 2567 |
| 2567 // static | 2568 // static |
| 2568 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2569 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2569 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2570 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2570 browser_window_gtk->Init(); | 2571 browser_window_gtk->Init(); |
| 2571 return browser_window_gtk; | 2572 return browser_window_gtk; |
| 2572 } | 2573 } |
| OLD | NEW |