summaryrefslogtreecommitdiffstats
path: root/ash/launcher
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-22 20:06:40 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-22 20:06:40 +0000
commit7a6ce0295b08bb905a741b9fc9a5689fed45beb9 (patch)
tree5b2520dd67bc49372149aa46ced084cc438218ff /ash/launcher
parent81626f42f7de4dd6f7c4dd13ef6bc31ca8d0092a (diff)
downloadchromium_src-7a6ce0295b08bb905a741b9fc9a5689fed45beb9.zip
chromium_src-7a6ce0295b08bb905a741b9fc9a5689fed45beb9.tar.gz
chromium_src-7a6ce0295b08bb905a741b9fc9a5689fed45beb9.tar.bz2
Fixing the target position of the phantom window for minimize of "ordinary browser" windows
BUG=168171 TEST=visual Review URL: https://chromiumcodereview.appspot.com/11867033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher')
-rw-r--r--ash/launcher/launcher_util.cc22
-rw-r--r--ash/launcher/launcher_util.h21
2 files changed, 43 insertions, 0 deletions
diff --git a/ash/launcher/launcher_util.cc b/ash/launcher/launcher_util.cc
new file mode 100644
index 0000000..f7ba77f
--- /dev/null
+++ b/ash/launcher/launcher_util.cc
@@ -0,0 +1,22 @@
+// 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/launcher/launcher_util.h"
+
+#include "ash/launcher/launcher_model.h"
+#include "ash/launcher/launcher_types.h"
+
+namespace ash {
+namespace launcher {
+
+int GetBrowserItemIndex(const LauncherModel& launcher_model) {
+ for (size_t i = 0; i < launcher_model.items().size(); i++) {
+ if (launcher_model.items()[i].type == ash::TYPE_BROWSER_SHORTCUT)
+ return i;
+ }
+ return -1;
+}
+
+} // namespace launcher
+} // namespace ash
diff --git a/ash/launcher/launcher_util.h b/ash/launcher/launcher_util.h
new file mode 100644
index 0000000..89551f0
--- /dev/null
+++ b/ash/launcher/launcher_util.h
@@ -0,0 +1,21 @@
+// 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.
+
+#ifndef ASH_LAUNCHER_LAUNCHER_UTIL_H_
+#define ASH_LAUNCHER_LAUNCHER_UTIL_H_
+
+#include "ash/ash_export.h"
+
+namespace ash {
+class LauncherModel;
+
+namespace launcher {
+
+// Return the index of the browser item from a given |launcher_model|.
+ASH_EXPORT int GetBrowserItemIndex(const LauncherModel& launcher_model);
+
+} // namespace launcher
+} // namespace ash
+
+#endif // ASH_LAUNCHER_LAUNCHER_UTIL_H_