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

Unified Diff: ash/launcher/launcher.cc

Issue 9689047: Added notion of currently active app / browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mid air collision Created 8 years, 9 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 | « ash/launcher/launcher.h ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher.cc
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc
index f5c9cc7e0c7f1e39bec6e37844291306c243bcf5..3f0e37e856cbe08ad36d746b5b383b4b9e2bcf4e 100644
--- a/ash/launcher/launcher.cc
+++ b/ash/launcher/launcher.cc
@@ -96,7 +96,8 @@ void Launcher::DelegateView::Layout() {
Launcher::Launcher(aura::Window* window_container)
: widget_(NULL),
window_container_(window_container),
- delegate_view_(NULL) {
+ delegate_view_(NULL),
+ launcher_view_(NULL) {
model_.reset(new LauncherModel);
if (Shell::GetInstance()->delegate()) {
delegate_.reset(
@@ -111,15 +112,15 @@ Launcher::Launcher(aura::Window* window_container)
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
params.parent = Shell::GetInstance()->GetContainer(
ash::internal::kShellWindowId_LauncherContainer);
- internal::LauncherView* launcher_view =
- new internal::LauncherView(model_.get(), delegate_.get());
- launcher_view->Init();
+ launcher_view_ = new internal::LauncherView(model_.get(), delegate_.get());
+ launcher_view_->Init();
delegate_view_ = new DelegateView;
- delegate_view_->AddChildView(launcher_view);
+ delegate_view_->AddChildView(launcher_view_);
params.delegate = delegate_view_;
widget_->Init(params);
widget_->GetNativeWindow()->SetName("LauncherWindow");
- gfx::Size pref = static_cast<views::View*>(launcher_view)->GetPreferredSize();
+ gfx::Size pref =
+ static_cast<views::View*>(launcher_view_)->GetPreferredSize();
widget_->SetBounds(gfx::Rect(0, 0, pref.width(), pref.height()));
// The launcher should not take focus when it is initially shown.
widget_->set_focus_on_creation(false);
@@ -139,4 +140,8 @@ int Launcher::GetStatusWidth() {
return delegate_view_->status_width();
}
+internal::LauncherView* Launcher::GetLauncherViewForTest() {
+ return static_cast<internal::LauncherView*>(
+ widget_->GetContentsView()->child_at(0));
+}
} // namespace ash
« no previous file with comments | « ash/launcher/launcher.h ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698