summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 01:50:05 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 01:50:05 +0000
commit5b251f10c00377eb437bf11d52128ff7f359a5e3 (patch)
tree56695914261a7a2d9ad8e8934080551c8db90452 /ui/aura
parent8eb21c922f41dd850ea71e7fb391e50f7b4a9f5f (diff)
downloadchromium_src-5b251f10c00377eb437bf11d52128ff7f359a5e3.zip
chromium_src-5b251f10c00377eb437bf11d52128ff7f359a5e3.tar.gz
chromium_src-5b251f10c00377eb437bf11d52128ff7f359a5e3.tar.bz2
wm: public window_types.
Patch manually generated by: $ git grep -l aura::client::WINDOW_TYPE | xargs sed -i -e 's/aura::client::WINDOW_TYPE/ui::wm::WINDOW_TYPE/g' $ git commit -a -m. $ git clang-format HEAD^ --style=Chromium $ git commit -a -m. * Move window_types.h header from ui/aura/client/ to ui/wm/public/ BUG=319638 TEST=ash_unittests, aura_unittests, views_unittests, unit_tests R=ben@chromium.org Review URL: https://codereview.chromium.org/115153002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/DEPS1
-rw-r--r--ui/aura/aura.gyp1
-rw-r--r--ui/aura/client/window_types.h36
-rw-r--r--ui/aura/test/aura_test_base.cc2
-rw-r--r--ui/aura/test/test_windows.cc8
-rw-r--r--ui/aura/test/test_windows.h6
-rw-r--r--ui/aura/window.cc4
-rw-r--r--ui/aura/window.h8
8 files changed, 13 insertions, 53 deletions
diff --git a/ui/aura/DEPS b/ui/aura/DEPS
index c252218..6ee093b 100644
--- a/ui/aura/DEPS
+++ b/ui/aura/DEPS
@@ -10,5 +10,6 @@ include_rules = [
"+ui/metro_viewer", # TODO(beng): investigate moving remote_root_window_host
# to ui/metro_viewer.
"+ui/ozone",
+ "+ui/wm/public",
]
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 928501a..bc7b980 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -76,7 +76,6 @@
'client/window_stacking_client.h',
'client/window_tree_client.cc',
'client/window_tree_client.h',
- 'client/window_types.h',
'device_list_updater_aurax11.cc',
'device_list_updater_aurax11.h',
'dispatcher_win.cc',
diff --git a/ui/aura/client/window_types.h b/ui/aura/client/window_types.h
deleted file mode 100644
index f0a7b77..0000000
--- a/ui/aura/client/window_types.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 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_TYPES_H_
-#define UI_AURA_WINDOW_TYPES_H_
-
-namespace aura {
-namespace client {
-
-// This isn't a property because it can't change after the window has been
-// initialized. It's in client because the Aura Client application derives
-// meaning from these values, not Aura itself.
-enum WindowType {
- WINDOW_TYPE_UNKNOWN = 0,
-
- // Regular windows that should be laid out by the client.
- WINDOW_TYPE_NORMAL,
-
- // Miscellaneous windows that should not be laid out by the shell.
- WINDOW_TYPE_POPUP,
-
- // A window intended as a control. Not laid out by the shell.
- WINDOW_TYPE_CONTROL,
-
- // Always on top windows aligned to bottom right of screen.
- WINDOW_TYPE_PANEL,
-
- WINDOW_TYPE_MENU,
- WINDOW_TYPE_TOOLTIP,
-};
-
-} // namespace client
-} // namespace aura
-
-#endif // UI_AURA_WINDOW_TYPES_H_
diff --git a/ui/aura/test/aura_test_base.cc b/ui/aura/test/aura_test_base.cc
index 8393766..4522c98 100644
--- a/ui/aura/test/aura_test_base.cc
+++ b/ui/aura/test/aura_test_base.cc
@@ -100,7 +100,7 @@ Window* AuraTestBase::CreateNormalWindow(int id, Window* parent,
Window* AuraTestBase::CreateTransientChild(int id, Window* parent) {
Window* window = new Window(NULL);
window->set_id(id);
- window->SetType(aura::client::WINDOW_TYPE_NORMAL);
+ window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_TEXTURED);
aura::client::ParentWindowWithContext(window, root_window(), gfx::Rect());
parent->AddTransientChild(window);
diff --git a/ui/aura/test/test_windows.cc b/ui/aura/test/test_windows.cc
index 8f1c21d..48ee575 100644
--- a/ui/aura/test/test_windows.cc
+++ b/ui/aura/test/test_windows.cc
@@ -34,15 +34,11 @@ Window* CreateTestWindowWithDelegate(WindowDelegate* delegate,
const gfx::Rect& bounds,
Window* parent) {
return CreateTestWindowWithDelegateAndType(
- delegate,
- aura::client::WINDOW_TYPE_NORMAL,
- id,
- bounds,
- parent);
+ delegate, ui::wm::WINDOW_TYPE_NORMAL, id, bounds, parent);
}
Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate,
- client::WindowType type,
+ ui::wm::WindowType type,
int id,
const gfx::Rect& bounds,
Window* parent) {
diff --git a/ui/aura/test/test_windows.h b/ui/aura/test/test_windows.h
index e99fa62..ef6a2f0 100644
--- a/ui/aura/test/test_windows.h
+++ b/ui/aura/test/test_windows.h
@@ -9,9 +9,9 @@
#include "base/compiler_specific.h"
#include "third_party/skia/include/core/SkColor.h"
-#include "ui/aura/client/window_types.h"
-#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/aura_test_base.h"
+#include "ui/aura/test/test_window_delegate.h"
+#include "ui/wm/public/window_types.h"
namespace aura {
namespace test {
@@ -27,7 +27,7 @@ Window* CreateTestWindowWithDelegate(WindowDelegate* delegate,
const gfx::Rect& bounds,
Window* parent);
Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate,
- client::WindowType type,
+ ui::wm::WindowType type,
int id,
const gfx::Rect& bounds,
Window* parent);
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 4836a15..404ad15 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -214,7 +214,7 @@ class ScopedCursorHider {
Window::Window(WindowDelegate* delegate)
: dispatcher_(NULL),
- type_(client::WINDOW_TYPE_UNKNOWN),
+ type_(ui::wm::WINDOW_TYPE_UNKNOWN),
owned_by_parent_(true),
delegate_(delegate),
parent_(NULL),
@@ -348,7 +348,7 @@ ui::Layer* Window::RecreateLayer() {
return old_layer;
}
-void Window::SetType(client::WindowType type) {
+void Window::SetType(ui::wm::WindowType type) {
// Cannot change type after the window is initialized.
DCHECK(!layer_);
type_ = type;
diff --git a/ui/aura/window.h b/ui/aura/window.h
index d69d88e..6b65be4 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -15,7 +15,6 @@
#include "base/observer_list.h"
#include "base/strings/string16.h"
#include "ui/aura/aura_export.h"
-#include "ui/aura/client/window_types.h"
#include "ui/aura/window_layer_type.h"
#include "ui/aura/window_observer.h"
#include "ui/compositor/layer_animator.h"
@@ -29,6 +28,7 @@
#include "ui/gfx/insets.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
+#include "ui/wm/public/window_types.h"
namespace gfx {
class Display;
@@ -100,8 +100,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// A type is used to identify a class of Windows and customize behavior such
// as event handling and parenting. This field should only be consumed by the
// shell -- Aura itself shouldn't contain type-specific logic.
- client::WindowType type() const { return type_; }
- void SetType(client::WindowType type);
+ ui::wm::WindowType type() const { return type_; }
+ void SetType(ui::wm::WindowType type);
int id() const { return id_; }
void set_id(int id) { id_ = id; }
@@ -548,7 +548,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
WindowEventDispatcher* dispatcher_;
- client::WindowType type_;
+ ui::wm::WindowType type_;
// True if the Window is owned by its parent - i.e. it will be deleted by its
// parent during its parents destruction. True is the default.