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

Side by Side Diff: ui/aura_shell/launcher/launcher.cc

Issue 8585007: Added hotkey support to 8508009 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile issue Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/launcher/launcher.h" 5 #include "ui/aura_shell/launcher/launcher.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura_shell/launcher/launcher_model.h" 8 #include "ui/aura_shell/launcher/launcher_model.h"
9 #include "ui/aura_shell/launcher/launcher_view.h" 9 #include "ui/aura_shell/launcher/launcher_view.h"
10 #include "ui/aura_shell/shell.h" 10 #include "ui/aura_shell/shell.h"
(...skipping 20 matching lines...) Expand all
31 aura_shell::internal::kShellWindowId_LauncherContainer); 31 aura_shell::internal::kShellWindowId_LauncherContainer);
32 internal::LauncherView* launcher_view = 32 internal::LauncherView* launcher_view =
33 new internal::LauncherView(model_.get()); 33 new internal::LauncherView(model_.get());
34 launcher_view->Init(); 34 launcher_view->Init();
35 params.delegate = launcher_view; 35 params.delegate = launcher_view;
36 widget_->Init(params); 36 widget_->Init(params);
37 gfx::Size pref = static_cast<views::View*>(launcher_view)->GetPreferredSize(); 37 gfx::Size pref = static_cast<views::View*>(launcher_view)->GetPreferredSize();
38 widget_->SetBounds(gfx::Rect(0, 0, pref.width(), pref.height())); 38 widget_->SetBounds(gfx::Rect(0, 0, pref.width(), pref.height()));
39 widget_->SetContentsView(launcher_view); 39 widget_->SetContentsView(launcher_view);
40 widget_->Show(); 40 widget_->Show();
41 widget_->GetNativeView()->set_name("LauncherView"); 41 widget_->GetNativeView()->SetName("LauncherView");
42 } 42 }
43 43
44 Launcher::~Launcher() { 44 Launcher::~Launcher() {
45 window_container_->RemoveObserver(this); 45 window_container_->RemoveObserver(this);
46 for (WindowMap::iterator i = known_windows_.begin(); 46 for (WindowMap::iterator i = known_windows_.begin();
47 i != known_windows_.end(); ++i) { 47 i != known_windows_.end(); ++i) {
48 i->first->RemoveObserver(this); 48 i->first->RemoveObserver(this);
49 } 49 }
50 } 50 }
51 51
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 model_->RemoveItemAt(i - model_->items().begin()); 89 model_->RemoveItemAt(i - model_->items().begin());
90 } 90 }
91 91
92 void Launcher::OnWindowVisibilityChanged(aura::Window* window, 92 void Launcher::OnWindowVisibilityChanged(aura::Window* window,
93 bool visibile) { 93 bool visibile) {
94 if (visibile && !known_windows_[window]) 94 if (visibile && !known_windows_[window])
95 MaybeAdd(window); 95 MaybeAdd(window);
96 } 96 }
97 97
98 } // namespace aura_shell 98 } // namespace aura_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698