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

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

Issue 7685049: ntp4: app install improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore code Created 9 years, 4 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) 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 1101
1102 bool Browser::IsTabStripEditable() const { 1102 bool Browser::IsTabStripEditable() const {
1103 return window()->IsTabStripEditable(); 1103 return window()->IsTabStripEditable();
1104 } 1104 }
1105 1105
1106 int Browser::GetIndexForInsertionDuringRestore(int relative_index) { 1106 int Browser::GetIndexForInsertionDuringRestore(int relative_index) {
1107 return (tab_handler_->GetTabStripModel()->insertion_policy() == 1107 return (tab_handler_->GetTabStripModel()->insertion_policy() ==
1108 TabStripModel::INSERT_AFTER) ? tab_count() : relative_index; 1108 TabStripModel::INSERT_AFTER) ? tab_count() : relative_index;
1109 } 1109 }
1110 1110
1111 TabContentsWrapper* Browser::AddSelectedTabWithURL(const GURL& url, 1111 TabContentsWrapper* Browser::AddSelectedTabWithURL(
1112 PageTransition::Type transition) { 1112 const GURL& url,
1113 PageTransition::Type transition) {
1113 browser::NavigateParams params(this, url, transition); 1114 browser::NavigateParams params(this, url, transition);
1114 params.disposition = NEW_FOREGROUND_TAB; 1115 params.disposition = NEW_FOREGROUND_TAB;
1115 browser::Navigate(&params); 1116 browser::Navigate(&params);
1116 return params.target_contents; 1117 return params.target_contents;
1117 } 1118 }
1118 1119
1119 TabContents* Browser::AddTab(TabContentsWrapper* tab_contents, 1120 TabContents* Browser::AddTab(TabContentsWrapper* tab_contents,
1120 PageTransition::Type type) { 1121 PageTransition::Type type) {
1121 tab_handler_->GetTabStripModel()->AddTabContents( 1122 tab_handler_->GetTabStripModel()->AddTabContents(
1122 tab_contents, -1, type, TabStripModel::ADD_ACTIVE); 1123 tab_contents, -1, type, TabStripModel::ADD_ACTIVE);
(...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after
4879 } 4880 }
4880 4881
4881 void Browser::ShowSyncSetup() { 4882 void Browser::ShowSyncSetup() {
4882 ProfileSyncService* service = 4883 ProfileSyncService* service =
4883 profile()->GetOriginalProfile()->GetProfileSyncService(); 4884 profile()->GetOriginalProfile()->GetProfileSyncService();
4884 if (service->HasSyncSetupCompleted()) 4885 if (service->HasSyncSetupCompleted())
4885 ShowOptionsTab(chrome::kSyncSetupSubPage); 4886 ShowOptionsTab(chrome::kSyncSetupSubPage);
4886 else 4887 else
4887 service->ShowLoginDialog(); 4888 service->ShowLoginDialog();
4888 } 4889 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698