| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_PARENTING_CLIENT_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_PARENTING_CLIENT_H_ |
| 6 #define HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_PARENTING_CLIENT_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_PARENTING_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/aura/client/window_parenting_client.h" | 9 #include "ui/aura/client/window_parenting_client.h" |
| 10 | 10 |
| 11 namespace headless { | 11 namespace headless { |
| 12 | 12 |
| 13 class HeadlessWindowParentingClient | 13 class HeadlessWindowParentingClient |
| 14 : public aura::client::WindowParentingClient { | 14 : public aura::client::WindowParentingClient { |
| 15 public: | 15 public: |
| 16 explicit HeadlessWindowParentingClient(aura::Window* root_window); | 16 explicit HeadlessWindowParentingClient(aura::Window* root_window); |
| 17 ~HeadlessWindowParentingClient() override; | 17 ~HeadlessWindowParentingClient() override; |
| 18 | 18 |
| 19 aura::Window* GetDefaultParent(aura::Window* context, | 19 aura::Window* GetDefaultParent(aura::Window* window, |
| 20 aura::Window* window, | |
| 21 const gfx::Rect& bounds) override; | 20 const gfx::Rect& bounds) override; |
| 22 | 21 |
| 23 private: | 22 private: |
| 24 aura::Window* root_window_; // Not owned. | 23 aura::Window* root_window_; // Not owned. |
| 25 | 24 |
| 26 DISALLOW_COPY_AND_ASSIGN(HeadlessWindowParentingClient); | 25 DISALLOW_COPY_AND_ASSIGN(HeadlessWindowParentingClient); |
| 27 }; | 26 }; |
| 28 | 27 |
| 29 } // namespace headless | 28 } // namespace headless |
| 30 | 29 |
| 31 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_PARENTING_CLIENT_H_ | 30 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_PARENTING_CLIENT_H_ |
| OLD | NEW |