OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ash/launcher/launcher.h" | 5 #include "ash/launcher/launcher.h" |
6 | 6 |
7 #include "ash/launcher/launcher_model.h" | 7 #include "ash/launcher/launcher_model.h" |
8 #include "ash/launcher/launcher_view.h" | 8 #include "ash/launcher/launcher_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 widget_->set_focus_on_creation(false); | 126 widget_->set_focus_on_creation(false); |
127 widget_->SetContentsView(delegate_view_); | 127 widget_->SetContentsView(delegate_view_); |
128 widget_->Show(); | 128 widget_->Show(); |
129 widget_->GetNativeView()->SetName("LauncherView"); | 129 widget_->GetNativeView()->SetName("LauncherView"); |
130 } | 130 } |
131 | 131 |
132 Launcher::~Launcher() { | 132 Launcher::~Launcher() { |
133 widget_->CloseNow(); | 133 widget_->CloseNow(); |
134 } | 134 } |
135 | 135 |
136 bool Launcher::Activate() { | |
137 bool focus = delegate_view_->SetPaneFocusAndFocusDefault(); | |
138 if (focus) { | |
sky
2012/01/30 15:52:46
nit: no {}
Zachary Kuznia
2012/01/31 11:00:50
Done.
| |
139 widget_->Activate(); | |
140 } | |
141 return focus; | |
142 } | |
143 | |
136 void Launcher::SetStatusWidth(int width) { | 144 void Launcher::SetStatusWidth(int width) { |
137 delegate_view_->SetStatusWidth(width); | 145 delegate_view_->SetStatusWidth(width); |
138 } | 146 } |
139 | 147 |
140 int Launcher::GetStatusWidth() { | 148 int Launcher::GetStatusWidth() { |
141 return delegate_view_->status_width(); | 149 return delegate_view_->status_width(); |
142 } | 150 } |
143 | 151 |
144 } // namespace ash | 152 } // namespace ash |
OLD | NEW |