This source file includes following definitions.
- WorkAreaChanged
- Create
#include "chrome/browser/ui/panels/display_settings_provider.h"
#include "ui/base/work_area_watcher_observer.h"
#include "ui/base/x/work_area_watcher_x.h"
namespace {
class DisplaySettingsProviderGtk : public DisplaySettingsProvider,
public ui::WorkAreaWatcherObserver {
public:
DisplaySettingsProviderGtk();
virtual ~DisplaySettingsProviderGtk();
protected:
virtual void WorkAreaChanged() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProviderGtk);
};
DisplaySettingsProviderGtk::DisplaySettingsProviderGtk() {
ui::WorkAreaWatcherX::AddObserver(this);
}
DisplaySettingsProviderGtk::~DisplaySettingsProviderGtk() {
ui::WorkAreaWatcherX::RemoveObserver(this);
}
void DisplaySettingsProviderGtk::WorkAreaChanged() {
OnDisplaySettingsChanged();
}
}
DisplaySettingsProvider* DisplaySettingsProvider::Create() {
return new DisplaySettingsProviderGtk();
}