OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/scoped_tabbed_browser_displayer.h" | 5 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 | 10 |
11 namespace chrome { | 11 namespace chrome { |
12 | 12 |
13 ScopedTabbedBrowserDisplayer::ScopedTabbedBrowserDisplayer( | 13 ScopedTabbedBrowserDisplayer::ScopedTabbedBrowserDisplayer( |
14 Profile* profile, | 14 Profile* profile, |
15 HostDesktopType type) { | 15 HostDesktopType type) { |
16 browser_ = FindTabbedBrowser(profile, false, type); | 16 browser_ = FindTabbedBrowser(profile, false); |
17 if (!browser_) | 17 if (!browser_) |
18 browser_ = new Browser(Browser::CreateParams(profile, type)); | 18 browser_ = new Browser(Browser::CreateParams(profile, type)); |
19 } | 19 } |
20 | 20 |
21 ScopedTabbedBrowserDisplayer::~ScopedTabbedBrowserDisplayer() { | 21 ScopedTabbedBrowserDisplayer::~ScopedTabbedBrowserDisplayer() { |
22 browser_->window()->Show(); | 22 browser_->window()->Show(); |
23 } | 23 } |
24 | 24 |
25 } // namespace chrome | 25 } // namespace chrome |
OLD | NEW |