Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / scoped_tabbed_browser_displayer.h
blob996b843f1c4a4587b903d5aed49fa6b72b7028b8
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_
6 #define CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_
8 #include "base/basictypes.h"
9 #include "chrome/browser/ui/host_desktop.h"
11 class Browser;
12 class Profile;
14 namespace chrome {
16 // This class finds the last active tabbed browser matching |profile| and
17 // |type|. If there is no tabbed browser, a new non visible browser is created.
18 // ScopedTabbedBrowserDisplayer ensures that the browser is made visible and is
19 // activated by the time that ScopedTabbedBrowserDisplayer goes out of scope.
20 class ScopedTabbedBrowserDisplayer {
21 public:
22 ScopedTabbedBrowserDisplayer(Profile* profile, HostDesktopType type);
23 ~ScopedTabbedBrowserDisplayer();
25 Browser* browser() {
26 return browser_;
29 private:
30 Browser* browser_;
32 DISALLOW_COPY_AND_ASSIGN(ScopedTabbedBrowserDisplayer);
35 } // namespace chrome
37 #endif // CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_