| 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 #ifndef CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_ | 5 #ifndef CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_ |
| 6 #define CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_ | 6 #define CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/ui/host_desktop.h" | 9 #include "ui/gfx/host_desktop_type.h" |
| 10 | 10 |
| 11 class Browser; | 11 class Browser; |
| 12 class Profile; | 12 class Profile; |
| 13 | 13 |
| 14 namespace chrome { | 14 namespace chrome { |
| 15 | 15 |
| 16 // This class finds the last active tabbed browser matching |profile| and | 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. | 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 | 18 // ScopedTabbedBrowserDisplayer ensures that the browser is made visible and is |
| 19 // activated by the time that ScopedTabbedBrowserDisplayer goes out of scope. | 19 // activated by the time that ScopedTabbedBrowserDisplayer goes out of scope. |
| 20 class ScopedTabbedBrowserDisplayer { | 20 class ScopedTabbedBrowserDisplayer { |
| 21 public: | 21 public: |
| 22 ScopedTabbedBrowserDisplayer(Profile* profile, ui::HostDesktopType type); | 22 ScopedTabbedBrowserDisplayer(Profile* profile, ui::HostDesktopType type); |
| 23 ~ScopedTabbedBrowserDisplayer(); | 23 ~ScopedTabbedBrowserDisplayer(); |
| 24 | 24 |
| 25 Browser* browser() { | 25 Browser* browser() { |
| 26 return browser_; | 26 return browser_; |
| 27 } | 27 } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 Browser* browser_; | 30 Browser* browser_; |
| 31 | 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(ScopedTabbedBrowserDisplayer); | 32 DISALLOW_COPY_AND_ASSIGN(ScopedTabbedBrowserDisplayer); |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace chrome | 35 } // namespace chrome |
| 36 | 36 |
| 37 #endif // CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_ | 37 #endif // CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_ |
| OLD | NEW |