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

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

Issue 149303003: [Refactor] Move the logic to update bounds for show type from WorkspaceLayoutManager to DefaultState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DEFAULT_STATE_H_ 5 #ifndef ASH_WM_DEFAULT_STATE_H_
6 #define ASH_WM_DEFAULT_STATE_H_ 6 #define ASH_WM_DEFAULT_STATE_H_
7 7
8 #include "ash/wm/window_state.h" 8 #include "ash/wm/window_state.h"
9 9
10 namespace ash { 10 namespace ash {
11 namespace wm { 11 namespace wm {
12 12
13 // DefaultState implements Ash behavior without state machine. 13 // DefaultState implements Ash behavior without state machine.
14 class DefaultState : public WindowState::State { 14 class DefaultState : public WindowState::State {
15 public: 15 public:
16 DefaultState(); 16 DefaultState();
17 virtual ~DefaultState(); 17 virtual ~DefaultState();
18 18
19 // WindowState::State overrides: 19 // WindowState::State overrides:
20 virtual void OnWMEvent(WindowState* window_state, 20 virtual void OnWMEvent(WindowState* window_state, WMEvent event) OVERRIDE;
21 WMEvent event) OVERRIDE; 21
22 private: 22 private:
23 // Process a stete dependent events, such as TOGGLE_MAXIMZIED,
24 // TOGGLE_FULLSCREEN.
25 static bool ProcessCompoundEvents(WindowState* window_state, WMEvent event);
26
27 // Update the window bounds according to the current and previous show type.
28 static void UpdateBoundsFromShowType(wm::WindowState* window_state,
29 wm::WindowShowType old_show_type);
30
23 DISALLOW_COPY_AND_ASSIGN(DefaultState); 31 DISALLOW_COPY_AND_ASSIGN(DefaultState);
24 }; 32 };
25 33
26 } // namespace wm 34 } // namespace wm
27 } // namespace ash 35 } // namespace ash
28 36
29 #endif // ASH_WM_DEFAULT_STATE_H_ 37 #endif // ASH_WM_DEFAULT_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698