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 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 | 1188 |
1189 void BrowserWindowGtk::HideInstant() { | 1189 void BrowserWindowGtk::HideInstant() { |
1190 contents_container_->PopPreview(); | 1190 contents_container_->PopPreview(); |
1191 MaybeShowBookmarkBar(false); | 1191 MaybeShowBookmarkBar(false); |
1192 } | 1192 } |
1193 | 1193 |
1194 gfx::Rect BrowserWindowGtk::GetInstantBounds() { | 1194 gfx::Rect BrowserWindowGtk::GetInstantBounds() { |
1195 return ui::GetWidgetScreenBounds(contents_container_->widget()); | 1195 return ui::GetWidgetScreenBounds(contents_container_->widget()); |
1196 } | 1196 } |
1197 | 1197 |
| 1198 bool BrowserWindowGtk::GetIsShowingInstant() { |
| 1199 return contents_container_->HasPreview(); |
| 1200 } |
| 1201 |
1198 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( | 1202 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( |
1199 const gfx::Rect& bounds) { | 1203 const gfx::Rect& bounds) { |
1200 return NEW_POPUP; | 1204 return NEW_POPUP; |
1201 } | 1205 } |
1202 | 1206 |
1203 FindBar* BrowserWindowGtk::CreateFindBar() { | 1207 FindBar* BrowserWindowGtk::CreateFindBar() { |
1204 return new FindBarGtk(this); | 1208 return new FindBarGtk(this); |
1205 } | 1209 } |
1206 | 1210 |
1207 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, | 1211 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2479 wm_type == ui::WM_OPENBOX || | 2483 wm_type == ui::WM_OPENBOX || |
2480 wm_type == ui::WM_XFWM4); | 2484 wm_type == ui::WM_XFWM4); |
2481 } | 2485 } |
2482 | 2486 |
2483 // static | 2487 // static |
2484 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2488 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2485 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2489 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2486 browser_window_gtk->Init(); | 2490 browser_window_gtk->Init(); |
2487 return browser_window_gtk; | 2491 return browser_window_gtk; |
2488 } | 2492 } |
OLD | NEW |