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

Side by Side Diff: ash/wm/overlay_event_filter.h

Issue 645513008: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ash/wm/mru_window_tracker_unittest.cc ('k') | ash/wm/partial_screenshot_view.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) 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_WM_OVERLAY_EVENT_FILTER_H_ 5 #ifndef ASH_WM_OVERLAY_EVENT_FILTER_H_
6 #define ASH_WM_OVERLAY_EVENT_FILTER_H_ 6 #define ASH_WM_OVERLAY_EVENT_FILTER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 19 matching lines...) Expand all
30 30
31 // Returns true if the overlay should be canceled in response to |event|. 31 // Returns true if the overlay should be canceled in response to |event|.
32 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) = 0; 32 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) = 0;
33 33
34 // Returns the window that needs to receive events. NULL if no window needs 34 // Returns the window that needs to receive events. NULL if no window needs
35 // to receive key events from OverlayEventFilter. 35 // to receive key events from OverlayEventFilter.
36 virtual aura::Window* GetWindow() = 0; 36 virtual aura::Window* GetWindow() = 0;
37 }; 37 };
38 38
39 OverlayEventFilter(); 39 OverlayEventFilter();
40 virtual ~OverlayEventFilter(); 40 ~OverlayEventFilter() override;
41 41
42 // Starts the filtering of events. It also notifies the specified 42 // Starts the filtering of events. It also notifies the specified
43 // |delegate| when a key event means cancel (like Esc). It holds the 43 // |delegate| when a key event means cancel (like Esc). It holds the
44 // pointer to the specified |delegate| until Deactivate() is called, but 44 // pointer to the specified |delegate| until Deactivate() is called, but
45 // does not take ownership. 45 // does not take ownership.
46 void Activate(Delegate* delegate); 46 void Activate(Delegate* delegate);
47 47
48 // Ends the filtering of events. 48 // Ends the filtering of events.
49 void Deactivate(Delegate* delegate); 49 void Deactivate(Delegate* delegate);
50 50
51 // Cancels the partial screenshot UI. Do nothing if it's not activated. 51 // Cancels the partial screenshot UI. Do nothing if it's not activated.
52 void Cancel(); 52 void Cancel();
53 53
54 // Returns true if it's currently active. 54 // Returns true if it's currently active.
55 bool IsActive(); 55 bool IsActive();
56 56
57 // ui::EventHandler overrides: 57 // ui::EventHandler overrides:
58 virtual void OnKeyEvent(ui::KeyEvent* event) override; 58 void OnKeyEvent(ui::KeyEvent* event) override;
59 59
60 // ShellObserver overrides: 60 // ShellObserver overrides:
61 virtual void OnLoginStateChanged(user::LoginStatus status) override; 61 void OnLoginStateChanged(user::LoginStatus status) override;
62 virtual void OnAppTerminating() override; 62 void OnAppTerminating() override;
63 virtual void OnLockStateChanged(bool locked) override; 63 void OnLockStateChanged(bool locked) override;
64 64
65 private: 65 private:
66 FRIEND_TEST_ALL_PREFIXES(PartialScreenshotViewTest, DontStartOverOverlay); 66 FRIEND_TEST_ALL_PREFIXES(PartialScreenshotViewTest, DontStartOverOverlay);
67 67
68 Delegate* delegate_; 68 Delegate* delegate_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(OverlayEventFilter); 70 DISALLOW_COPY_AND_ASSIGN(OverlayEventFilter);
71 }; 71 };
72 72
73 } // namespace ash 73 } // namespace ash
74 74
75 #endif // ASH_WM_OVERLAY_EVENT_FILTER_H_ 75 #endif // ASH_WM_OVERLAY_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « ash/wm/mru_window_tracker_unittest.cc ('k') | ash/wm/partial_screenshot_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698