| OLD | NEW |
| 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 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 content::WebContents* startupContent = NULL; | 696 content::WebContents* startupContent = NULL; |
| 697 | 697 |
| 698 if (browser && browser->tab_strip_model()->count() == 1) { | 698 if (browser && browser->tab_strip_model()->count() == 1) { |
| 699 startupIndex = browser->tab_strip_model()->active_index(); | 699 startupIndex = browser->tab_strip_model()->active_index(); |
| 700 startupContent = browser->tab_strip_model()->GetActiveWebContents(); | 700 startupContent = browser->tab_strip_model()->GetActiveWebContents(); |
| 701 } | 701 } |
| 702 | 702 |
| 703 [self openUrls:urls]; | 703 [self openUrls:urls]; |
| 704 | 704 |
| 705 if (startupIndex != TabStripModel::kNoTab && | 705 if (startupIndex != TabStripModel::kNoTab && |
| 706 startupContent->GetVisibleURL() == GURL(chrome::kChromeUINewTabURL)) { | 706 startupContent->GetVisibleURL() == chrome::kChromeUINewTabURL) { |
| 707 browser->tab_strip_model()->CloseWebContentsAt(startupIndex, | 707 browser->tab_strip_model()->CloseWebContentsAt(startupIndex, |
| 708 TabStripModel::CLOSE_NONE); | 708 TabStripModel::CLOSE_NONE); |
| 709 } | 709 } |
| 710 } | 710 } |
| 711 | 711 |
| 712 // This is called after profiles have been loaded and preferences registered. | 712 // This is called after profiles have been loaded and preferences registered. |
| 713 // It is safe to access the default profile here. | 713 // It is safe to access the default profile here. |
| 714 - (void)applicationDidFinishLaunching:(NSNotification*)notify { | 714 - (void)applicationDidFinishLaunching:(NSNotification*)notify { |
| 715 MacStartupProfiler::GetInstance()->Profile( | 715 MacStartupProfiler::GetInstance()->Profile( |
| 716 MacStartupProfiler::DID_FINISH_LAUNCHING); | 716 MacStartupProfiler::DID_FINISH_LAUNCHING); |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 | 1665 |
| 1666 //--------------------------------------------------------------------------- | 1666 //--------------------------------------------------------------------------- |
| 1667 | 1667 |
| 1668 namespace app_controller_mac { | 1668 namespace app_controller_mac { |
| 1669 | 1669 |
| 1670 bool IsOpeningNewWindow() { | 1670 bool IsOpeningNewWindow() { |
| 1671 return g_is_opening_new_window; | 1671 return g_is_opening_new_window; |
| 1672 } | 1672 } |
| 1673 | 1673 |
| 1674 } // namespace app_controller_mac | 1674 } // namespace app_controller_mac |
| OLD | NEW |