Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: chrome/test/base/test_browser_window_aura.h

Issue 1198313003: Fix the browser match rules. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sky@'s comment. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/test_browser_window.cc ('k') | chrome/test/base/test_browser_window_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/test_browser_window_aura.h
diff --git a/chrome/test/base/test_browser_window_aura.h b/chrome/test/base/test_browser_window_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb2e169755bbe31695eae8a4177dac4e0ea39d49
--- /dev/null
+++ b/chrome/test/base/test_browser_window_aura.h
@@ -0,0 +1,43 @@
+// Copyright 2015 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.
+
+#ifndef CHROME_TEST_BASE_TEST_BROWSER_WINDOW_AURA_H_
+#define CHROME_TEST_BASE_TEST_BROWSER_WINDOW_AURA_H_
+
+#include "chrome/test/base/test_browser_window.h"
+#include "ui/aura/window.h"
+
+// A browser window proxy with an associated Aura native window.
+class TestBrowserWindowAura : public TestBrowserWindow {
+ public:
+ explicit TestBrowserWindowAura(scoped_ptr<aura::Window> native_window);
+ ~TestBrowserWindowAura() override;
+
+ // TestBrowserWindow overrides:
+ gfx::NativeWindow GetNativeWindow() const override;
+ void Show() override;
+ void Hide() override;
+ gfx::Rect GetBounds() const override;
+
+ scoped_ptr<Browser> CreateBrowser(Browser::CreateParams* params);
+
+ private:
+ Browser* browser_; // not owned
+ scoped_ptr<aura::Window> native_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura);
+};
+
+namespace chrome {
+
+// Helper that creates a browser with a native Aura |window|. If |window| is
+// nullptr, it will create an Aura window to associate with the browser. It also
+// handles the lifetime of TestBrowserWindowAura.
+scoped_ptr<Browser> CreateBrowserWithAuraTestWindowForParams(
+ scoped_ptr<aura::Window> window,
+ Browser::CreateParams* params);
+
+} // namespace chrome
+
+#endif // CHROME_TEST_BASE_TEST_BROWSER_WINDOW_AURA_H_
« no previous file with comments | « chrome/test/base/test_browser_window.cc ('k') | chrome/test/base/test_browser_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698