| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 true, false, false, false); | 1237 true, false, false, false); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 void BrowserView::ShowInstant(TabContentsWrapper* preview) { | 1240 void BrowserView::ShowInstant(TabContentsWrapper* preview) { |
| 1241 if (!preview_container_) | 1241 if (!preview_container_) |
| 1242 preview_container_ = new TabContentsContainer(); | 1242 preview_container_ = new TabContentsContainer(); |
| 1243 contents_->SetPreview(preview_container_, preview->tab_contents()); | 1243 contents_->SetPreview(preview_container_, preview->tab_contents()); |
| 1244 preview_container_->ChangeTabContents(preview->tab_contents()); | 1244 preview_container_->ChangeTabContents(preview->tab_contents()); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 void BrowserView::HideInstant(bool instant_is_active) { | 1247 void BrowserView::HideInstant() { |
| 1248 if (!preview_container_) | 1248 if (!preview_container_) |
| 1249 return; | 1249 return; |
| 1250 | 1250 |
| 1251 // The contents must be changed before SetPreview is invoked. | 1251 // The contents must be changed before SetPreview is invoked. |
| 1252 preview_container_->ChangeTabContents(NULL); | 1252 preview_container_->ChangeTabContents(NULL); |
| 1253 contents_->SetPreview(NULL, NULL); | 1253 contents_->SetPreview(NULL, NULL); |
| 1254 delete preview_container_; | 1254 delete preview_container_; |
| 1255 preview_container_ = NULL; | 1255 preview_container_ = NULL; |
| 1256 } | 1256 } |
| 1257 | 1257 |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2555 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); | 2555 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); |
| 2556 gfx::Rect bounds; | 2556 gfx::Rect bounds; |
| 2557 bounds.set_origin(origin); | 2557 bounds.set_origin(origin); |
| 2558 | 2558 |
| 2559 AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get()); | 2559 AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get()); |
| 2560 // Bubble::Show() takes ownership of the view. | 2560 // Bubble::Show() takes ownership of the view. |
| 2561 Bubble::Show(this->GetWidget(), bounds, | 2561 Bubble::Show(this->GetWidget(), bounds, |
| 2562 views::BubbleBorder::TOP_RIGHT, | 2562 views::BubbleBorder::TOP_RIGHT, |
| 2563 bubble_view, bubble_view); | 2563 bubble_view, bubble_view); |
| 2564 } | 2564 } |
| OLD | NEW |