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

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: for try bots Created 9 years 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 widget_->CloseNow(); 45 widget_->CloseNow();
46 window_container_->RemoveObserver(this); 46 window_container_->RemoveObserver(this);
47 for (WindowMap::iterator i = known_windows_.begin(); 47 for (WindowMap::iterator i = known_windows_.begin();
48 i != known_windows_.end(); ++i) { 48 i != known_windows_.end(); ++i) {
49 i->first->RemoveObserver(this); 49 i->first->RemoveObserver(this);
50 } 50 }
51 } 51 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 model_->RemoveItemAt(i - model_->items().begin()); 90 model_->RemoveItemAt(i - model_->items().begin());
91 } 91 }
92 92
93 void Launcher::OnWindowVisibilityChanged(aura::Window* window, 93 void Launcher::OnWindowVisibilityChanged(aura::Window* window,
94 bool visibile) { 94 bool visibile) {
95 if (visibile && !known_windows_[window]) 95 if (visibile && !known_windows_[window])
96 MaybeAdd(window); 96 MaybeAdd(window);
97 } 97 }
98 98
99 } // namespace aura_shell 99 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/examples/window_type_launcher.cc ('k') | ui/aura_shell/modal_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698