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

Side by Side Diff: chrome/browser/ui/views/aura/chrome_shell_delegate.cc

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
« no previous file with comments | « chrome/browser/platform_util_aura.cc ('k') | chrome/test/base/browser_with_test_window_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/views/aura/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
6 6
7 #include "chrome/browser/profiles/profile_manager.h" 7 #include "chrome/browser/profiles/profile_manager.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/views/aura/app_list_window.h" 9 #include "chrome/browser/ui/views/aura/app_list_window.h"
10 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" 10 #include "chrome/browser/ui/views/aura/status_area_host_aura.h"
11 #include "chrome/browser/ui/views/frame/browser_view.h" 11 #include "chrome/browser/ui/views/frame/browser_view.h"
12 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
13 #include "ui/aura_shell/launcher/launcher_types.h" 13 #include "ui/aura_shell/launcher/launcher_types.h"
14 #include "ui/aura_shell/window_util.h"
14 15
15 // static 16 // static
16 ChromeShellDelegate* ChromeShellDelegate::instance_ = NULL; 17 ChromeShellDelegate* ChromeShellDelegate::instance_ = NULL;
17 18
18 ChromeShellDelegate::ChromeShellDelegate() { 19 ChromeShellDelegate::ChromeShellDelegate() {
19 instance_ = this; 20 instance_ = this;
20 } 21 }
21 22
22 ChromeShellDelegate::~ChromeShellDelegate() { 23 ChromeShellDelegate::~ChromeShellDelegate() {
23 if (instance_ == this) 24 if (instance_ == this)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 60
60 void ChromeShellDelegate::RequestAppListWidget( 61 void ChromeShellDelegate::RequestAppListWidget(
61 const gfx::Rect& bounds, 62 const gfx::Rect& bounds,
62 const SetWidgetCallback& callback) { 63 const SetWidgetCallback& callback) {
63 // AppListWindow deletes itself when closed. 64 // AppListWindow deletes itself when closed.
64 new AppListWindow(bounds, callback); 65 new AppListWindow(bounds, callback);
65 } 66 }
66 67
67 void ChromeShellDelegate::LauncherItemClicked( 68 void ChromeShellDelegate::LauncherItemClicked(
68 const aura_shell::LauncherItem& item) { 69 const aura_shell::LauncherItem& item) {
69 item.window->Activate(); 70 aura_shell::ActivateWindow(item.window);
70 } 71 }
71 72
72 bool ChromeShellDelegate::ConfigureLauncherItem( 73 bool ChromeShellDelegate::ConfigureLauncherItem(
73 aura_shell::LauncherItem* item) { 74 aura_shell::LauncherItem* item) {
74 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); 75 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window);
75 return view && 76 return view &&
76 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); 77 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type));
77 } 78 }
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_aura.cc ('k') | chrome/test/base/browser_with_test_window_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698