1 // Copyright 2015 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_TEST_BASE_TEST_BROWSER_WINDOW_AURA_H_
6 #define CHROME_TEST_BASE_TEST_BROWSER_WINDOW_AURA_H_
8 #include "chrome/test/base/test_browser_window.h"
9 #include "ui/aura/window.h"
11 // A browser window proxy with an associated Aura native window.
12 class TestBrowserWindowAura
: public TestBrowserWindow
{
14 explicit TestBrowserWindowAura(scoped_ptr
<aura::Window
> native_window
);
15 ~TestBrowserWindowAura() override
;
17 // TestBrowserWindow overrides:
18 gfx::NativeWindow
GetNativeWindow() const override
;
21 gfx::Rect
GetBounds() const override
;
23 scoped_ptr
<Browser
> CreateBrowser(Browser::CreateParams
* params
);
26 Browser
* browser_
; // not owned
27 scoped_ptr
<aura::Window
> native_window_
;
29 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura
);
34 // Helper that creates a browser with a native Aura |window|. If |window| is
35 // nullptr, it will create an Aura window to associate with the browser. It also
36 // handles the lifetime of TestBrowserWindowAura.
37 scoped_ptr
<Browser
> CreateBrowserWithAuraTestWindowForParams(
38 scoped_ptr
<aura::Window
> window
,
39 Browser::CreateParams
* params
);
43 #endif // CHROME_TEST_BASE_TEST_BROWSER_WINDOW_AURA_H_