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"
11 class DisplaySettingsProviderGtk
: public DisplaySettingsProvider
,
12 public ui::WorkAreaWatcherObserver
{
14 DisplaySettingsProviderGtk();
15 virtual ~DisplaySettingsProviderGtk();
18 // Overridden from ui::WorkAreaWatcherObserver:
19 virtual void WorkAreaChanged() OVERRIDE
;
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();
40 DisplaySettingsProvider
* DisplaySettingsProvider::Create() {
41 return new DisplaySettingsProviderGtk();