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

Unified Diff: ui/aura/mus/in_flight_change.h

Issue 2445163002: Make aura work with mus (Closed)
Patch Set: NON_EXPORTED_BASE_CLASS Created 4 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
« no previous file with comments | « ui/aura/DEPS ('k') | ui/aura/mus/in_flight_change.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/in_flight_change.h
diff --git a/services/ui/public/cpp/in_flight_change.h b/ui/aura/mus/in_flight_change.h
similarity index 85%
copy from services/ui/public/cpp/in_flight_change.h
copy to ui/aura/mus/in_flight_change.h
index 649aa542340fe297a7d760d563d8f9ba0b014692..0291bafc95865fda14e913648f650ec8aa606eba 100644
--- a/services/ui/public/cpp/in_flight_change.h
+++ b/ui/aura/mus/in_flight_change.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_
-#define SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_
+#ifndef UI_AURA_MUS_IN_FLIGHT_CHANGE_H_
+#define UI_AURA_MUS_IN_FLIGHT_CHANGE_H_
#include <stdint.h>
@@ -14,7 +14,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "mojo/public/cpp/bindings/array.h"
-#include "services/ui/public/cpp/window_observer.h"
+#include "ui/aura/window_observer.h"
#include "ui/gfx/geometry/rect.h"
namespace ui {
@@ -23,7 +23,11 @@ namespace mojom {
enum class Cursor : int32_t;
}
-class Window;
+} // namespace ui
+
+namespace aura {
+
+class WindowMus;
class WindowTreeClient;
enum class ChangeType {
@@ -100,12 +104,12 @@ enum class ChangeType {
//
class InFlightChange {
public:
- InFlightChange(Window* window, ChangeType type);
+ InFlightChange(WindowMus* window, ChangeType type);
virtual ~InFlightChange();
// NOTE: for properties not associated with any window window is null.
- Window* window() { return window_; }
- const Window* window() const { return window_; }
+ WindowMus* window() { return window_; }
+ const WindowMus* window() const { return window_; }
ChangeType change_type() const { return change_type_; }
// Returns true if the two changes are considered the same. This is only
@@ -127,13 +131,13 @@ class InFlightChange {
virtual void Revert() = 0;
private:
- Window* window_;
+ WindowMus* window_;
const ChangeType change_type_;
};
class InFlightBoundsChange : public InFlightChange {
public:
- InFlightBoundsChange(Window* window, const gfx::Rect& revert_bounds);
+ InFlightBoundsChange(WindowMus* window, const gfx::Rect& revert_bounds);
// InFlightChange:
void SetRevertValueFrom(const InFlightChange& change) override;
@@ -147,7 +151,7 @@ class InFlightBoundsChange : public InFlightChange {
class InFlightDragChange : public InFlightChange {
public:
- InFlightDragChange(Window* window, ChangeType type);
+ InFlightDragChange(WindowMus* window, ChangeType type);
// InFlightChange:
void SetRevertValueFrom(const InFlightChange& change) override;
@@ -161,7 +165,7 @@ class InFlightDragChange : public InFlightChange {
// expected to always complete.
class CrashInFlightChange : public InFlightChange {
public:
- CrashInFlightChange(Window* window, ChangeType type);
+ CrashInFlightChange(WindowMus* window, ChangeType type);
~CrashInFlightChange() override;
// InFlightChange:
@@ -183,7 +187,7 @@ class InFlightWindowTreeClientChange : public InFlightChange,
public WindowObserver {
public:
InFlightWindowTreeClientChange(WindowTreeClient* client,
- Window* revert_value,
+ WindowMus* revert_value,
ChangeType type);
~InFlightWindowTreeClientChange() override;
@@ -192,23 +196,23 @@ class InFlightWindowTreeClientChange : public InFlightChange,
protected:
WindowTreeClient* client() { return client_; }
- Window* revert_window() { return revert_window_; }
+ WindowMus* revert_window() { return revert_window_; }
private:
- void SetRevertWindow(Window* window);
+ void SetRevertWindow(WindowMus* window);
// WindowObserver:
- void OnWindowDestroying(Window* window) override;
+ void OnWindowDestroyed(Window* window) override;
WindowTreeClient* client_;
- Window* revert_window_;
+ WindowMus* revert_window_;
DISALLOW_COPY_AND_ASSIGN(InFlightWindowTreeClientChange);
};
class InFlightCaptureChange : public InFlightWindowTreeClientChange {
public:
- InFlightCaptureChange(WindowTreeClient* client, Window* revert_value);
+ InFlightCaptureChange(WindowTreeClient* client, WindowMus* revert_value);
~InFlightCaptureChange() override;
// InFlightChange:
@@ -220,7 +224,7 @@ class InFlightCaptureChange : public InFlightWindowTreeClientChange {
class InFlightFocusChange : public InFlightWindowTreeClientChange {
public:
- InFlightFocusChange(WindowTreeClient* client, Window* revert_value);
+ InFlightFocusChange(WindowTreeClient* client, WindowMus* revert_value);
~InFlightFocusChange() override;
// InFlightChange:
@@ -232,9 +236,9 @@ class InFlightFocusChange : public InFlightWindowTreeClientChange {
class InFlightPropertyChange : public InFlightChange {
public:
- InFlightPropertyChange(Window* window,
+ InFlightPropertyChange(WindowMus* window,
const std::string& property_name,
- const mojo::Array<uint8_t>& revert_value);
+ std::unique_ptr<std::vector<uint8_t>> revert_value);
~InFlightPropertyChange() override;
// InFlightChange:
@@ -244,14 +248,15 @@ class InFlightPropertyChange : public InFlightChange {
private:
const std::string property_name_;
- mojo::Array<uint8_t> revert_value_;
+ std::unique_ptr<std::vector<uint8_t>> revert_value_;
DISALLOW_COPY_AND_ASSIGN(InFlightPropertyChange);
};
class InFlightPredefinedCursorChange : public InFlightChange {
public:
- InFlightPredefinedCursorChange(Window* window, mojom::Cursor revert_value);
+ InFlightPredefinedCursorChange(WindowMus* window,
+ ui::mojom::Cursor revert_value);
~InFlightPredefinedCursorChange() override;
// InFlightChange:
@@ -259,14 +264,14 @@ class InFlightPredefinedCursorChange : public InFlightChange {
void Revert() override;
private:
- mojom::Cursor revert_cursor_;
+ ui::mojom::Cursor revert_cursor_;
DISALLOW_COPY_AND_ASSIGN(InFlightPredefinedCursorChange);
};
class InFlightVisibleChange : public InFlightChange {
public:
- InFlightVisibleChange(Window* window, const bool revert_value);
+ InFlightVisibleChange(WindowMus* window, const bool revert_value);
~InFlightVisibleChange() override;
// InFlightChange:
@@ -281,7 +286,7 @@ class InFlightVisibleChange : public InFlightChange {
class InFlightOpacityChange : public InFlightChange {
public:
- InFlightOpacityChange(Window* window, float revert_value);
+ InFlightOpacityChange(WindowMus* window, float revert_value);
~InFlightOpacityChange() override;
// InFlightChange:
@@ -296,7 +301,7 @@ class InFlightOpacityChange : public InFlightChange {
class InFlightSetModalChange : public InFlightChange {
public:
- explicit InFlightSetModalChange(Window* window);
+ explicit InFlightSetModalChange(WindowMus* window);
~InFlightSetModalChange() override;
// InFlightChange:
@@ -307,6 +312,6 @@ class InFlightSetModalChange : public InFlightChange {
DISALLOW_COPY_AND_ASSIGN(InFlightSetModalChange);
};
-} // namespace ui
+} // namespace aura
-#endif // SERVICES_UI_PUBLIC_CPP_IN_FLIGHT_CHANGE_H_
+#endif // UI_AURA_MUS_IN_FLIGHT_CHANGE_H_
« no previous file with comments | « ui/aura/DEPS ('k') | ui/aura/mus/in_flight_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698