Index: ui/aura/window.cc |
diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
index 4a0fb350a56fbd4833d726f13ba07bdfcd42d11a..85ba13a8e69befd1bf3d4bc18d5333bbc86994ec 100644 |
--- a/ui/aura/window.cc |
+++ b/ui/aura/window.cc |
@@ -26,7 +26,7 @@ |
namespace aura { |
Window::Window(WindowDelegate* delegate) |
- : type_(kWindowType_None), |
+ : type_(WINDOW_TYPE_UNKNOWN), |
delegate_(delegate), |
show_state_(ui::SHOW_STATE_NORMAL), |
parent_(NULL), |
@@ -75,15 +75,16 @@ Window::~Window() { |
STLDeleteValues(&prop_map_); |
} |
-void Window::Init(ui::Layer::LayerType layer_type) { |
+void Window::Init(ui::Layer::LayerType layer_type, |
+ LayerInitialState layer_state) { |
layer_.reset(new ui::Layer(Desktop::GetInstance()->compositor(), layer_type)); |
// Windows (and therefore their layers) should initially be hidden, except for |
// controls. |
- layer_->SetVisible(type_ == kWindowType_Control); |
+ layer_->SetVisible(layer_state == LAYER_INITIALLY_VISIBLE); |
layer_->set_delegate(this); |
} |
-void Window::SetType(int type) { |
+void Window::SetType(WindowType type) { |
// Cannot change type after the window is initialized. |
DCHECK(!layer()); |
type_ = type; |