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

Unified Diff: ui/aura/window_tree_host_platform.h

Issue 1390883003: aura: Unify WindowTreeHost for some platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build Created 5 years, 2 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
Index: ui/aura/window_tree_host_platform.h
diff --git a/ui/aura/window_tree_host_win.h b/ui/aura/window_tree_host_platform.h
similarity index 73%
rename from ui/aura/window_tree_host_win.h
rename to ui/aura/window_tree_host_platform.h
index e49890d2f67ea7789136ba32711820ead8437e1d..8a69b98e1c97df4da01bfe2e31de0b14ad0e0ba0 100644
--- a/ui/aura/window_tree_host_win.h
+++ b/ui/aura/window_tree_host_platform.h
@@ -1,26 +1,30 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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 UI_AURA_WINDOW_TREE_HOST_WIN_H_
-#define UI_AURA_WINDOW_TREE_HOST_WIN_H_
+#ifndef UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_
+#define UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "ui/aura/aura_export.h"
#include "ui/aura/window_tree_host.h"
+#include "ui/gfx/native_widget_types.h"
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_delegate.h"
namespace aura {
-class AURA_EXPORT WindowTreeHostWin
+// The unified WindowTreeHost implementation for platforms
+// that implement PlatformWindow.
+class AURA_EXPORT WindowTreeHostPlatform
: public WindowTreeHost,
public NON_EXPORTED_BASE(ui::PlatformWindowDelegate) {
public:
- explicit WindowTreeHostWin(const gfx::Rect& bounds);
- ~WindowTreeHostWin() override;
+ explicit WindowTreeHostPlatform(const gfx::Rect& bounds);
+ ~WindowTreeHostPlatform() override;
+ public:
sadrul 2015/10/15 19:47:40 not needed.
no sievers 2015/10/16 18:26:15 Done.
// WindowTreeHost:
ui::EventSource* GetEventSource() override;
gfx::AcceleratedWidget GetAcceleratedWidget() override;
@@ -36,7 +40,7 @@ class AURA_EXPORT WindowTreeHostWin
void OnCursorVisibilityChangedNative(bool show) override;
protected:
- gfx::AcceleratedWidget hwnd() const { return widget_; }
+ ui::PlatformWindow* platform_window() { return window_.get(); }
private:
// ui::PlatformWindowDelegate:
@@ -51,14 +55,15 @@ class AURA_EXPORT WindowTreeHostWin
float device_pixel_ratio) override;
void OnActivationChanged(bool active) override;
- bool has_capture_;
- gfx::Rect bounds_;
gfx::AcceleratedWidget widget_;
scoped_ptr<ui::PlatformWindow> window_;
+ gfx::NativeCursor current_cursor_;
+ bool has_capture_;
+ gfx::Rect bounds_;
- DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin);
+ DISALLOW_COPY_AND_ASSIGN(WindowTreeHostPlatform);
};
} // namespace aura
-#endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_
+#endif // UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_

Powered by Google App Engine
This is Rietveld 408576698