Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / chrome / browser / ui / gtk / panels / display_settings_provider_gtk.cc
blobc77518d4a34e8273ea366af99287d219c1d98775
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/panels/display_settings_provider.h"
6 #include "ui/base/work_area_watcher_observer.h"
7 #include "ui/base/x/work_area_watcher_x.h"
9 namespace {
11 class DisplaySettingsProviderGtk : public DisplaySettingsProvider,
12 public ui::WorkAreaWatcherObserver {
13 public:
14 DisplaySettingsProviderGtk();
15 virtual ~DisplaySettingsProviderGtk();
17 protected:
18 // Overridden from ui::WorkAreaWatcherObserver:
19 virtual void WorkAreaChanged() OVERRIDE;
21 private:
22 DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProviderGtk);
25 DisplaySettingsProviderGtk::DisplaySettingsProviderGtk() {
26 ui::WorkAreaWatcherX::AddObserver(this);
29 DisplaySettingsProviderGtk::~DisplaySettingsProviderGtk() {
30 ui::WorkAreaWatcherX::RemoveObserver(this);
33 void DisplaySettingsProviderGtk::WorkAreaChanged() {
34 OnDisplaySettingsChanged();
37 } // namespace
39 // static
40 DisplaySettingsProvider* DisplaySettingsProvider::Create() {
41 return new DisplaySettingsProviderGtk();