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

Side by Side Diff: chrome/browser/ui/views/external_tab_container_win.cc

Issue 12036075: alternate ntp: fix website page jankiness when suggestions show and top bars are hidden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed all comments Created 7 years, 10 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
OLDNEW
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/views/external_tab_container_win.h" 5 #include "chrome/browser/ui/views/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 // Shift-Tab. 1194 // Shift-Tab.
1195 Profile* profile = 1195 Profile* profile =
1196 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 1196 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
1197 tab_contents_container_ = new views::WebView(profile); 1197 tab_contents_container_ = new views::WebView(profile);
1198 1198
1199 // The views created here will be destroyed when the ExternalTabContainer 1199 // The views created here will be destroyed when the ExternalTabContainer
1200 // widget is torn down. 1200 // widget is torn down.
1201 external_tab_view_ = new views::View(); 1201 external_tab_view_ = new views::View();
1202 1202
1203 InfoBarContainerView* info_bar_container = 1203 InfoBarContainerView* info_bar_container =
1204 new InfoBarContainerView(this, NULL); 1204 new InfoBarContainerView(this, NULL, NULL);
1205 InfoBarService* infobar_service = 1205 InfoBarService* infobar_service =
1206 InfoBarService::FromWebContents(web_contents_.get()); 1206 InfoBarService::FromWebContents(web_contents_.get());
1207 info_bar_container->ChangeInfoBarService(infobar_service); 1207 info_bar_container->ChangeInfoBarService(infobar_service);
1208 1208
1209 views::GridLayout* layout = new views::GridLayout(external_tab_view_); 1209 views::GridLayout* layout = new views::GridLayout(external_tab_view_);
1210 // Give this column an identifier of 0. 1210 // Give this column an identifier of 0.
1211 views::ColumnSet* columns = layout->AddColumnSet(0); 1211 views::ColumnSet* columns = layout->AddColumnSet(0);
1212 columns->AddColumn(views::GridLayout::FILL, 1212 columns->AddColumn(views::GridLayout::FILL,
1213 views::GridLayout::FILL, 1213 views::GridLayout::FILL,
1214 1, 1214 1,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 if (params.disposition == CURRENT_TAB) { 1279 if (params.disposition == CURRENT_TAB) {
1280 DCHECK(route_all_top_level_navigations_); 1280 DCHECK(route_all_top_level_navigations_);
1281 forward_params.disposition = NEW_FOREGROUND_TAB; 1281 forward_params.disposition = NEW_FOREGROUND_TAB;
1282 } 1282 }
1283 WebContents* new_contents = 1283 WebContents* new_contents =
1284 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); 1284 ExternalTabContainerWin::OpenURLFromTab(source, forward_params);
1285 // support only one navigation for a dummy tab before it is killed. 1285 // support only one navigation for a dummy tab before it is killed.
1286 ::DestroyWindow(GetNativeView()); 1286 ::DestroyWindow(GetNativeView());
1287 return new_contents; 1287 return new_contents;
1288 } 1288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698