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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.h

Issue 11471027: Added more tests for IncognitoModeAvailability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style issues. Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
7 7
8 #include "ash/launcher/launcher_alignment_menu.h" 8 #include "ash/launcher/launcher_alignment_menu.h"
9 #include "ash/launcher/launcher_types.h" 9 #include "ash/launcher/launcher_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/gtest_prod_util.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "ui/base/models/simple_menu_model.h" 13 #include "ui/base/models/simple_menu_model.h"
13 14
14 class ChromeLauncherController; 15 class ChromeLauncherController;
15 16
16 namespace aura { 17 namespace aura {
17 class RootWindow; 18 class RootWindow;
18 } 19 }
19 20
20 namespace extensions { 21 namespace extensions {
(...skipping 23 matching lines...) Expand all
44 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; 45 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE;
45 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; 46 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE;
46 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 47 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
47 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 48 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
48 virtual bool GetAcceleratorForCommandId( 49 virtual bool GetAcceleratorForCommandId(
49 int command_id, 50 int command_id,
50 ui::Accelerator* accelerator) OVERRIDE; 51 ui::Accelerator* accelerator) OVERRIDE;
51 virtual void ExecuteCommand(int command_id) OVERRIDE; 52 virtual void ExecuteCommand(int command_id) OVERRIDE;
52 53
53 private: 54 private:
55 FRIEND_TEST_ALL_PREFIXES(
56 LauncherContextMenuTest,
57 NewIncognitoWindowMenuIsDisabledWhenIncognitoModeOff);
58 FRIEND_TEST_ALL_PREFIXES(
59 LauncherContextMenuTest,
60 NewWindowMenuIsDisabledWhenIncognitoModeForced);
61
54 enum MenuItem { 62 enum MenuItem {
55 MENU_OPEN_NEW, 63 MENU_OPEN_NEW,
56 MENU_CLOSE, 64 MENU_CLOSE,
57 MENU_PIN, 65 MENU_PIN,
58 LAUNCH_TYPE_PINNED_TAB, 66 LAUNCH_TYPE_PINNED_TAB,
59 LAUNCH_TYPE_REGULAR_TAB, 67 LAUNCH_TYPE_REGULAR_TAB,
60 LAUNCH_TYPE_FULLSCREEN, 68 LAUNCH_TYPE_FULLSCREEN,
61 LAUNCH_TYPE_WINDOW, 69 LAUNCH_TYPE_WINDOW,
62 MENU_AUTO_HIDE, 70 MENU_AUTO_HIDE,
63 MENU_NEW_WINDOW, 71 MENU_NEW_WINDOW,
(...skipping 13 matching lines...) Expand all
77 ash::LauncherAlignmentMenu launcher_alignment_menu_; 85 ash::LauncherAlignmentMenu launcher_alignment_menu_;
78 86
79 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; 87 scoped_ptr<extensions::ContextMenuMatcher> extension_items_;
80 88
81 aura::RootWindow* root_window_; 89 aura::RootWindow* root_window_;
82 90
83 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); 91 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu);
84 }; 92 };
85 93
86 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ 94 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698