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

Unified Diff: ash/shell/launcher_delegate_impl.cc

Issue 9788001: Remove stops_event_propagation from Window, since it's broken. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Index: ash/shell/launcher_delegate_impl.cc
===================================================================
--- ash/shell/launcher_delegate_impl.cc (revision 0)
+++ ash/shell/launcher_delegate_impl.cc (revision 0)
@@ -0,0 +1,54 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/shell/launcher_delegate_impl.h"
+
+#include "ash/shell/toplevel_window.h"
+#include "ash/shell/window_watcher.h"
+#include "ash/wm/window_util.h"
+#include "grit/ui_resources.h"
+#include "ui/aura/window.h"
+
+namespace ash {
+namespace shell {
+
+LauncherDelegateImpl::LauncherDelegateImpl(WindowWatcher* watcher)
+ : watcher_(watcher) {
+}
+
+LauncherDelegateImpl::~LauncherDelegateImpl() {
+}
+
+void LauncherDelegateImpl::CreateNewWindow() {
+ ash::shell::ToplevelWindow::CreateParams create_params;
+ create_params.can_resize = true;
+ create_params.can_maximize = true;
+ ash::shell::ToplevelWindow::CreateToplevelWindow(create_params);
+}
+
+void LauncherDelegateImpl::ItemClicked(const ash::LauncherItem& item) {
+ aura::Window* window = watcher_->GetWindowByID(item.id);
+ window->Show();
+ ash::wm::ActivateWindow(window);
+}
+
+int LauncherDelegateImpl::GetBrowserShortcutResourceId() {
+ return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT;
+}
+
+string16 LauncherDelegateImpl::GetTitle(const ash::LauncherItem& item) {
+ return watcher_->GetWindowByID(item.id)->title();
+}
+
+ui::MenuModel* LauncherDelegateImpl::CreateContextMenu(
+ const ash::LauncherItem& item) {
+ return NULL;
+}
+
+ash::LauncherID LauncherDelegateImpl::GetIDByWindow(aura::Window* window) {
+ return watcher_->GetIDByWindow(window);
+}
+
+} // namespace shell
+} // namespace ash
Property changes on: ash\shell\launcher_delegate_impl.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698