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

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

Issue 4694008: Make pink's TabContentsWrapper change compile on Windows.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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) 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/ui/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 30 matching lines...) Expand all
41 #include "chrome/browser/renderer_host/render_process_host.h" 41 #include "chrome/browser/renderer_host/render_process_host.h"
42 #include "chrome/browser/search_engines/template_url.h" 42 #include "chrome/browser/search_engines/template_url.h"
43 #include "chrome/browser/search_engines/template_url_model.h" 43 #include "chrome/browser/search_engines/template_url_model.h"
44 #include "chrome/browser/sessions/session_restore.h" 44 #include "chrome/browser/sessions/session_restore.h"
45 #include "chrome/browser/sessions/session_service.h" 45 #include "chrome/browser/sessions/session_service.h"
46 #include "chrome/browser/shell_integration.h" 46 #include "chrome/browser/shell_integration.h"
47 #include "chrome/browser/tab_contents/infobar_delegate.h" 47 #include "chrome/browser/tab_contents/infobar_delegate.h"
48 #include "chrome/browser/tab_contents/navigation_controller.h" 48 #include "chrome/browser/tab_contents/navigation_controller.h"
49 #include "chrome/browser/tab_contents/tab_contents.h" 49 #include "chrome/browser/tab_contents/tab_contents.h"
50 #include "chrome/browser/tab_contents/tab_contents_view.h" 50 #include "chrome/browser/tab_contents/tab_contents_view.h"
51 #include "chrome/browser/tab_contents_wrapper.h"
51 #include "chrome/browser/tabs/pinned_tab_codec.h" 52 #include "chrome/browser/tabs/pinned_tab_codec.h"
52 #include "chrome/browser/tabs/tab_strip_model.h" 53 #include "chrome/browser/tabs/tab_strip_model.h"
53 #include "chrome/browser/ui/browser_navigator.h" 54 #include "chrome/browser/ui/browser_navigator.h"
54 #include "chrome/common/chrome_constants.h" 55 #include "chrome/common/chrome_constants.h"
55 #include "chrome/common/chrome_paths.h" 56 #include "chrome/common/chrome_paths.h"
56 #include "chrome/common/chrome_switches.h" 57 #include "chrome/common/chrome_switches.h"
57 #include "chrome/common/pref_names.h" 58 #include "chrome/common/pref_names.h"
58 #include "chrome/common/result_codes.h" 59 #include "chrome/common/result_codes.h"
59 #include "chrome/common/url_constants.h" 60 #include "chrome/common/url_constants.h"
60 #include "chrome/installer/util/browser_distribution.h" 61 #include "chrome/installer/util/browser_distribution.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 771
771 browser::NavigateParams params(browser, tabs[i].url, 772 browser::NavigateParams params(browser, tabs[i].url,
772 PageTransition::START_PAGE); 773 PageTransition::START_PAGE);
773 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 774 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
774 params.tabstrip_index = index; 775 params.tabstrip_index = index;
775 params.tabstrip_add_types = add_types; 776 params.tabstrip_add_types = add_types;
776 params.extension_app_id = tabs[i].app_id; 777 params.extension_app_id = tabs[i].app_id;
777 browser::Navigate(&params); 778 browser::Navigate(&params);
778 779
779 if (profile_ && first_tab && process_startup) { 780 if (profile_ && first_tab && process_startup) {
780 AddCrashedInfoBarIfNecessary(params.target_contents); 781 AddCrashedInfoBarIfNecessary(params.target_contents->tab_contents());
781 AddBadFlagsInfoBarIfNecessary(params.target_contents); 782 AddBadFlagsInfoBarIfNecessary(params.target_contents->tab_contents());
782 } 783 }
783 784
784 first_tab = false; 785 first_tab = false;
785 } 786 }
786 browser->window()->Show(); 787 browser->window()->Show();
787 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial 788 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
788 // focus explicitly. 789 // focus explicitly.
789 browser->GetSelectedTabContents()->view()->SetInitialFocus(); 790 browser->GetSelectedTabContents()->view()->SetInitialFocus();
790 791
791 return browser; 792 return browser;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 scoped_refptr<AutomationProviderClass> automation = 1027 scoped_refptr<AutomationProviderClass> automation =
1027 new AutomationProviderClass(profile); 1028 new AutomationProviderClass(profile);
1028 automation->ConnectToChannel(channel_id); 1029 automation->ConnectToChannel(channel_id);
1029 automation->SetExpectedTabCount(expected_tabs); 1030 automation->SetExpectedTabCount(expected_tabs);
1030 1031
1031 AutomationProviderList* list = 1032 AutomationProviderList* list =
1032 g_browser_process->InitAutomationProviderList(); 1033 g_browser_process->InitAutomationProviderList();
1033 DCHECK(list); 1034 DCHECK(list);
1034 list->AddProvider(automation); 1035 list->AddProvider(automation);
1035 } 1036 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698