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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 void BrowserWindowGtk::ShowInstant(TabContents* preview, | 1138 void BrowserWindowGtk::ShowInstant(TabContents* preview, |
1139 int height, | 1139 int height, |
1140 InstantSizeUnits units) { | 1140 InstantSizeUnits units) { |
1141 // TODO(jered): Support height < 100%. | 1141 // TODO(jered): Support height < 100%. |
1142 DCHECK(height == 100 && units == INSTANT_SIZE_PERCENT); | 1142 DCHECK(height == 100 && units == INSTANT_SIZE_PERCENT); |
1143 contents_container_->SetPreview(preview); | 1143 contents_container_->SetPreview(preview); |
1144 MaybeShowBookmarkBar(false); | 1144 MaybeShowBookmarkBar(false); |
1145 } | 1145 } |
1146 | 1146 |
1147 void BrowserWindowGtk::HideInstant() { | 1147 void BrowserWindowGtk::HideInstant() { |
1148 contents_container_->PopPreview(); | 1148 contents_container_->SetPreview(NULL); |
1149 MaybeShowBookmarkBar(false); | 1149 MaybeShowBookmarkBar(false); |
1150 } | 1150 } |
1151 | 1151 |
1152 gfx::Rect BrowserWindowGtk::GetInstantBounds() { | 1152 gfx::Rect BrowserWindowGtk::GetInstantBounds() { |
1153 return ui::GetWidgetScreenBounds(contents_container_->widget()); | 1153 return ui::GetWidgetScreenBounds(contents_container_->widget()); |
1154 } | 1154 } |
1155 | 1155 |
1156 bool BrowserWindowGtk::IsInstantTabShowing() { | 1156 bool BrowserWindowGtk::IsInstantTabShowing() { |
1157 return contents_container_->HasPreview(); | 1157 return contents_container_->HasPreview(); |
1158 } | 1158 } |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2449 wm_type == ui::WM_OPENBOX || | 2449 wm_type == ui::WM_OPENBOX || |
2450 wm_type == ui::WM_XFWM4); | 2450 wm_type == ui::WM_XFWM4); |
2451 } | 2451 } |
2452 | 2452 |
2453 // static | 2453 // static |
2454 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2454 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2455 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2455 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2456 browser_window_gtk->Init(); | 2456 browser_window_gtk->Init(); |
2457 return browser_window_gtk; | 2457 return browser_window_gtk; |
2458 } | 2458 } |
OLD | NEW |