| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 #if defined(OS_WIN) | 1362 #if defined(OS_WIN) |
| 1363 // Removing the fade is instant (on windows). We need to force the preview to | 1363 // Removing the fade is instant (on windows). We need to force the preview to |
| 1364 // draw, otherwise the current page flickers before the new page appears. | 1364 // draw, otherwise the current page flickers before the new page appears. |
| 1365 RedrawWindow(preview_contents->view()->GetContentNativeView(), NULL, NULL, | 1365 RedrawWindow(preview_contents->view()->GetContentNativeView(), NULL, NULL, |
| 1366 RDW_INVALIDATE | RDW_UPDATENOW | RDW_NOCHILDREN); | 1366 RDW_INVALIDATE | RDW_UPDATENOW | RDW_NOCHILDREN); |
| 1367 #endif | 1367 #endif |
| 1368 | 1368 |
| 1369 contents_->RemoveFade(); | 1369 contents_->RemoveFade(); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void BrowserView::HideInstant() { | 1372 void BrowserView::HideInstant(bool instant_is_active) { |
| 1373 if (!preview_container_) { | 1373 if (instant_is_active) |
| 1374 contents_->ShowFade(); |
| 1375 else |
| 1374 contents_->RemoveFade(); | 1376 contents_->RemoveFade(); |
| 1377 |
| 1378 if (!preview_container_) |
| 1375 return; | 1379 return; |
| 1376 } | |
| 1377 | 1380 |
| 1378 // The contents must be changed before SetPreview is invoked. | 1381 // The contents must be changed before SetPreview is invoked. |
| 1379 preview_container_->ChangeTabContents(NULL); | 1382 preview_container_->ChangeTabContents(NULL); |
| 1380 contents_->SetPreview(NULL, NULL); | 1383 contents_->SetPreview(NULL, NULL); |
| 1381 delete preview_container_; | 1384 delete preview_container_; |
| 1382 preview_container_ = NULL; | 1385 preview_container_ = NULL; |
| 1383 contents_->RemoveFade(); | |
| 1384 } | 1386 } |
| 1385 | 1387 |
| 1386 gfx::Rect BrowserView::GetInstantBounds() { | 1388 gfx::Rect BrowserView::GetInstantBounds() { |
| 1387 return contents_->GetPreviewBounds(); | 1389 return contents_->GetPreviewBounds(); |
| 1388 } | 1390 } |
| 1389 | 1391 |
| 1390 #if defined(OS_CHROMEOS) | 1392 #if defined(OS_CHROMEOS) |
| 1391 void BrowserView::ShowKeyboardOverlay(gfx::NativeWindow owning_window) { | 1393 void BrowserView::ShowKeyboardOverlay(gfx::NativeWindow owning_window) { |
| 1392 KeyboardOverlayDelegate::ShowDialog(owning_window); | 1394 KeyboardOverlayDelegate::ShowDialog(owning_window); |
| 1393 } | 1395 } |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); | 2510 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); |
| 2509 | 2511 |
| 2510 return view; | 2512 return view; |
| 2511 } | 2513 } |
| 2512 #endif | 2514 #endif |
| 2513 | 2515 |
| 2514 // static | 2516 // static |
| 2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2517 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2518 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 2517 } | 2519 } |
| OLD | NEW |