blob: 05fac0c37507f842df5720dcb43f864fc325ce2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
namespace chrome {
ScopedTabbedBrowserDisplayer::ScopedTabbedBrowserDisplayer(
Profile* profile,
HostDesktopType type) {
browser_ = FindTabbedBrowser(profile, false, type);
if (!browser_)
browser_ = new Browser(Browser::CreateParams(profile, type));
}
ScopedTabbedBrowserDisplayer::~ScopedTabbedBrowserDisplayer() {
browser_->window()->Show();
}
} // namespace chrome
|