| 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 <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 | 1141 |
| 1142 void BrowserWindowGtk::HideInstant() { | 1142 void BrowserWindowGtk::HideInstant() { |
| 1143 contents_container_->PopPreview(); | 1143 contents_container_->PopPreview(); |
| 1144 MaybeShowBookmarkBar(false); | 1144 MaybeShowBookmarkBar(false); |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 gfx::Rect BrowserWindowGtk::GetInstantBounds() { | 1147 gfx::Rect BrowserWindowGtk::GetInstantBounds() { |
| 1148 return ui::GetWidgetScreenBounds(contents_container_->widget()); | 1148 return ui::GetWidgetScreenBounds(contents_container_->widget()); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 bool BrowserWindowGtk::IsInstantTabShowing() { |
| 1152 return contents_container_->HasPreview(); |
| 1153 } |
| 1154 |
| 1151 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( | 1155 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( |
| 1152 const gfx::Rect& bounds) { | 1156 const gfx::Rect& bounds) { |
| 1153 return NEW_POPUP; | 1157 return NEW_POPUP; |
| 1154 } | 1158 } |
| 1155 | 1159 |
| 1156 FindBar* BrowserWindowGtk::CreateFindBar() { | 1160 FindBar* BrowserWindowGtk::CreateFindBar() { |
| 1157 return new FindBarGtk(this); | 1161 return new FindBarGtk(this); |
| 1158 } | 1162 } |
| 1159 | 1163 |
| 1160 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, | 1164 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 wm_type == ui::WM_OPENBOX || | 2432 wm_type == ui::WM_OPENBOX || |
| 2429 wm_type == ui::WM_XFWM4); | 2433 wm_type == ui::WM_XFWM4); |
| 2430 } | 2434 } |
| 2431 | 2435 |
| 2432 // static | 2436 // static |
| 2433 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2437 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2434 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2438 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2435 browser_window_gtk->Init(); | 2439 browser_window_gtk->Init(); |
| 2436 return browser_window_gtk; | 2440 return browser_window_gtk; |
| 2437 } | 2441 } |
| OLD | NEW |