Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / webui / chromeos / touch_view_controller_delegate.cc
blobf36a848c870233a46137f5ffec3ba8e1679d766a
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.
5 #include "chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.h"
7 #include "ash/shell.h"
8 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
10 namespace chromeos {
12 TouchViewControllerDelegate::TouchViewControllerDelegate() {
13 ash::Shell::GetInstance()->AddShellObserver(this);
16 TouchViewControllerDelegate::~TouchViewControllerDelegate() {
17 ash::Shell::GetInstance()->RemoveShellObserver(this);
20 void TouchViewControllerDelegate::AddObserver(Observer* observer) {
21 observers_.AddObserver(observer);
24 void TouchViewControllerDelegate::RemoveObserver(Observer* observer) {
25 observers_.RemoveObserver(observer);
28 bool TouchViewControllerDelegate::IsMaximizeModeEnabled() const {
29 return ash::Shell::GetInstance()->maximize_mode_controller()->
30 IsMaximizeModeWindowManagerEnabled();
33 void TouchViewControllerDelegate::OnMaximizeModeStarted() {
34 FOR_EACH_OBSERVER(Observer, observers_, OnMaximizeModeStarted());
37 void TouchViewControllerDelegate::OnMaximizeModeEnded() {
38 FOR_EACH_OBSERVER(Observer, observers_, OnMaximizeModeEnded());
41 } // namespace chromeos