Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 8298005: Fixes bug in instant where we would end up incorrectly using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698