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

Side by Side Diff: chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.cc

Issue 2505403003: TouchView Mojom (Closed)
Patch Set: Minor param rename Created 4 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h"
6
7 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
8 #include "ash/common/wm_shell.h"
9
10 namespace chromeos {
11
12 TouchViewControllerDelegate::TouchViewControllerDelegate() {
13 ash::WmShell::Get()->AddShellObserver(this);
14 }
15
16 TouchViewControllerDelegate::~TouchViewControllerDelegate() {
17 ash::WmShell::Get()->RemoveShellObserver(this);
18 }
19
20 void TouchViewControllerDelegate::AddObserver(Observer* observer) {
21 observers_.AddObserver(observer);
22 }
23
24 void TouchViewControllerDelegate::RemoveObserver(Observer* observer) {
25 observers_.RemoveObserver(observer);
26 }
27
28 bool TouchViewControllerDelegate::IsMaximizeModeEnabled() const {
29 return ash::WmShell::Get()
30 ->maximize_mode_controller()
31 ->IsMaximizeModeWindowManagerEnabled();
32 }
33
34 void TouchViewControllerDelegate::OnMaximizeModeStarted() {
35 for (Observer& observer : observers_)
36 observer.OnMaximizeModeStarted();
37 }
38
39 void TouchViewControllerDelegate::OnMaximizeModeEnded() {
40 for (Observer& observer : observers_)
41 observer.OnMaximizeModeEnded();
42 }
43
44 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698