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

Side by Side Diff: ash/test/test_shell_delegate.h

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SkyNits Created 8 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 | « ash/shell_delegate.h ('k') | ash/test/test_shell_delegate.cc » ('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) 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 ASH_TEST_TEST_SHELL_DELEGATE_H_ 5 #ifndef ASH_TEST_TEST_SHELL_DELEGATE_H_
6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_ 6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_
7 7
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual void OpenFeedbackPage() OVERRIDE; 52 virtual void OpenFeedbackPage() OVERRIDE;
53 virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE; 53 virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
54 virtual void HandleMediaNextTrack() OVERRIDE; 54 virtual void HandleMediaNextTrack() OVERRIDE;
55 virtual void HandleMediaPlayPause() OVERRIDE; 55 virtual void HandleMediaPlayPause() OVERRIDE;
56 virtual void HandleMediaPrevTrack() OVERRIDE; 56 virtual void HandleMediaPrevTrack() OVERRIDE;
57 virtual string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE; 57 virtual string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE;
58 virtual void SaveScreenMagnifierScale(double scale) OVERRIDE; 58 virtual void SaveScreenMagnifierScale(double scale) OVERRIDE;
59 virtual double GetSavedScreenMagnifierScale() OVERRIDE; 59 virtual double GetSavedScreenMagnifierScale() OVERRIDE;
60 virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root) OVERRIDE; 60 virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root) OVERRIDE;
61 virtual aura::client::StackingClient* CreateStackingClient() OVERRIDE; 61 virtual aura::client::StackingClient* CreateStackingClient() OVERRIDE;
62 virtual bool IsSearchKeyActingAsFunctionKey() const OVERRIDE;
62 63
63 int num_exit_requests() const { return num_exit_requests_; } 64 int num_exit_requests() const { return num_exit_requests_; }
65 void set_is_search_key_acting_as_function_key(bool b) {
66 is_search_key_acting_as_function_key_ = b;
67 }
64 private: 68 private:
65 friend class ash::test::AshTestBase; 69 friend class ash::test::AshTestBase;
66 70
67 // Given |session_started| will update internal state. 71 // Given |session_started| will update internal state.
68 // If |session_started| is true this method will also set 72 // If |session_started| is true this method will also set
69 // |user_logged_in_| to true. 73 // |user_logged_in_| to true.
70 // When session is started it always means that user has logged in. 74 // When session is started it always means that user has logged in.
71 // Possible situation is that user has already logged in but session has not 75 // Possible situation is that user has already logged in but session has not
72 // been started (user selects avatar and login window is still open). 76 // been started (user selects avatar and login window is still open).
73 void SetSessionStarted(bool session_started); 77 void SetSessionStarted(bool session_started);
74 78
75 // Given |user_logged_in| will update internal state. 79 // Given |user_logged_in| will update internal state.
76 // If |user_logged_in| is false this method will also set |session_started_| 80 // If |user_logged_in| is false this method will also set |session_started_|
77 // to false. When user is not logged in it always means that session 81 // to false. When user is not logged in it always means that session
78 // hasn't been started too. 82 // hasn't been started too.
79 void SetUserLoggedIn(bool user_logged_in); 83 void SetUserLoggedIn(bool user_logged_in);
80 84
81 // Sets the internal state that indicates whether the user can lock the 85 // Sets the internal state that indicates whether the user can lock the
82 // screen. 86 // screen.
83 void SetCanLockScreen(bool can_lock_screen); 87 void SetCanLockScreen(bool can_lock_screen);
84 88
85 bool locked_; 89 bool locked_;
86 bool session_started_; 90 bool session_started_;
87 bool spoken_feedback_enabled_; 91 bool spoken_feedback_enabled_;
88 bool user_logged_in_; 92 bool user_logged_in_;
89 bool can_lock_screen_; 93 bool can_lock_screen_;
94 bool is_search_key_acting_as_function_key_;
90 int num_exit_requests_; 95 int num_exit_requests_;
91 96
92 scoped_ptr<content::BrowserContext> current_browser_context_; 97 scoped_ptr<content::BrowserContext> current_browser_context_;
93 98
94 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); 99 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
95 }; 100 };
96 101
97 } // namespace test 102 } // namespace test
98 } // namespace ash 103 } // namespace ash
99 104
100 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_ 105 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/shell_delegate.h ('k') | ash/test/test_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698