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

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

Issue 8591003: aura: Fix Chrome OS status area browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to GetStatusAreaForTest() and remove const-ness 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 "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 14
15 // static 15 // static
16 ChromeShellDelegate* ChromeShellDelegate::instance_ = NULL; 16 ChromeShellDelegate* ChromeShellDelegate::instance_ = NULL;
17 17
18 ChromeShellDelegate::ChromeShellDelegate() { 18 ChromeShellDelegate::ChromeShellDelegate() {
19 instance_ = this; 19 instance_ = this;
20 } 20 }
21 21
22 ChromeShellDelegate::~ChromeShellDelegate() { 22 ChromeShellDelegate::~ChromeShellDelegate() {
23 if (instance_ == this) 23 if (instance_ == this)
24 instance_ = NULL; 24 instance_ = NULL;
25 } 25 }
26 26
27 const views::View* ChromeShellDelegate::GetStatusArea() const { 27 views::View* ChromeShellDelegate::GetStatusAreaForTest() {
28 return status_area_host_->GetStatusArea(); 28 return status_area_host_->GetStatusAreaForTest();
29 } 29 }
30 30
31 // static 31 // static
32 bool ChromeShellDelegate::ShouldCreateLauncherItemForBrowser( 32 bool ChromeShellDelegate::ShouldCreateLauncherItemForBrowser(
33 Browser* browser, 33 Browser* browser,
34 aura_shell::LauncherItemType* type) { 34 aura_shell::LauncherItemType* type) {
35 if (browser->type() == Browser::TYPE_TABBED) { 35 if (browser->type() == Browser::TYPE_TABBED) {
36 *type = aura_shell::TYPE_TABBED; 36 *type = aura_shell::TYPE_TABBED;
37 return true; 37 return true;
38 } 38 }
(...skipping 26 matching lines...) Expand all
65 const aura_shell::LauncherItem& item) { 65 const aura_shell::LauncherItem& item) {
66 item.window->Activate(); 66 item.window->Activate();
67 } 67 }
68 68
69 bool ChromeShellDelegate::ConfigureLauncherItem( 69 bool ChromeShellDelegate::ConfigureLauncherItem(
70 aura_shell::LauncherItem* item) { 70 aura_shell::LauncherItem* item) {
71 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window); 71 BrowserView* view = BrowserView::GetBrowserViewForNativeWindow(item->window);
72 return view && 72 return view &&
73 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type)); 73 ShouldCreateLauncherItemForBrowser(view->browser(), &(item->type));
74 } 74 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/aura/chrome_shell_delegate.h ('k') | chrome/browser/ui/views/aura/status_area_host_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698