OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/event_recorder.h" | 9 #include "base/event_recorder.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 int pin_count = 0; | 552 int pin_count = 0; |
553 if (!browser) { | 553 if (!browser) { |
554 std::string pin_count_string = | 554 std::string pin_count_string = |
555 command_line_.GetSwitchValueASCII(switches::kPinnedTabCount); | 555 command_line_.GetSwitchValueASCII(switches::kPinnedTabCount); |
556 if (!pin_count_string.empty()) | 556 if (!pin_count_string.empty()) |
557 pin_count = StringToInt(pin_count_string); | 557 pin_count = StringToInt(pin_count_string); |
558 } | 558 } |
559 if (!browser || browser->type() != Browser::TYPE_NORMAL) | 559 if (!browser || browser->type() != Browser::TYPE_NORMAL) |
560 browser = Browser::Create(profile_); | 560 browser = Browser::Create(profile_); |
561 | 561 |
| 562 #if !defined(OS_MACOSX) |
| 563 // In kiosk mode, we want to always be fullscreen, so switch to that now. |
| 564 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
| 565 browser->ToggleFullscreenMode(); |
| 566 #endif |
| 567 |
562 for (size_t i = 0; i < urls.size(); ++i) { | 568 for (size_t i = 0; i < urls.size(); ++i) { |
563 // We skip URLs that we'd have to launch an external protocol handler for. | 569 // We skip URLs that we'd have to launch an external protocol handler for. |
564 // This avoids us getting into an infinite loop asking ourselves to open | 570 // This avoids us getting into an infinite loop asking ourselves to open |
565 // a URL, should the handler be (incorrectly) configured to be us. Anyone | 571 // a URL, should the handler be (incorrectly) configured to be us. Anyone |
566 // asking us to open such a URL should really ask the handler directly. | 572 // asking us to open such a URL should really ask the handler directly. |
567 if (!process_startup && !URLRequest::IsHandledURL(urls[i])) | 573 if (!process_startup && !URLRequest::IsHandledURL(urls[i])) |
568 continue; | 574 continue; |
569 TabContents* tab = browser->AddTabWithURL( | 575 TabContents* tab = browser->AddTabWithURL( |
570 urls[i], GURL(), PageTransition::START_PAGE, (i == 0), -1, false, NULL); | 576 urls[i], GURL(), PageTransition::START_PAGE, (i == 0), -1, false, NULL); |
571 if (i < static_cast<size_t>(pin_count)) | 577 if (i < static_cast<size_t>(pin_count)) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 scoped_refptr<AutomationProviderClass> automation = | 838 scoped_refptr<AutomationProviderClass> automation = |
833 new AutomationProviderClass(profile); | 839 new AutomationProviderClass(profile); |
834 automation->ConnectToChannel(channel_id); | 840 automation->ConnectToChannel(channel_id); |
835 automation->SetExpectedTabCount(expected_tabs); | 841 automation->SetExpectedTabCount(expected_tabs); |
836 | 842 |
837 AutomationProviderList* list = | 843 AutomationProviderList* list = |
838 g_browser_process->InitAutomationProviderList(); | 844 g_browser_process->InitAutomationProviderList(); |
839 DCHECK(list); | 845 DCHECK(list); |
840 list->AddProvider(automation); | 846 list->AddProvider(automation); |
841 } | 847 } |
OLD | NEW |