| Index: ash/display/display_util_x11.h
|
| diff --git a/ash/display/display_change_observer_x11.h b/ash/display/display_util_x11.h
|
| similarity index 29%
|
| copy from ash/display/display_change_observer_x11.h
|
| copy to ash/display/display_util_x11.h
|
| index 3d13e0d0147c44d71ccfe21a6d6f4edb872dab8e..602aa8d058474d23bc23ae3ee539522f4ff70fd2 100644
|
| --- a/ash/display/display_change_observer_x11.h
|
| +++ b/ash/display/display_util_x11.h
|
| @@ -1,52 +1,23 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H
|
| -#define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H
|
| +#ifndef ASH_DISPLAY_DISPLAY_UTIL_X11_H_
|
| +#define ASH_DISPLAY_DISPLAY_UTIL_X11_H_
|
|
|
| -#include <X11/Xlib.h>
|
| -
|
| -// Xlib.h defines RootWindow.
|
| -#undef RootWindow
|
| +#include <vector>
|
|
|
| #include "ash/ash_export.h"
|
| -#include "ash/shell_observer.h"
|
| -#include "base/basictypes.h"
|
| -#include "chromeos/display/output_configurator.h"
|
| +#include "ash/display/display_info.h"
|
| +
|
| +struct _XRRScreenResources;
|
| +typedef _XRRScreenResources XRRScreenResources;
|
| +struct _XRROutputInfo;
|
| +typedef _XRROutputInfo XRROutputInfo;
|
|
|
| namespace ash {
|
| namespace internal {
|
| -
|
| -// An object that observes changes in display configuration and
|
| -// update DisplayManagers.
|
| -class DisplayChangeObserverX11
|
| - : public chromeos::OutputConfigurator::StateController,
|
| - public chromeos::OutputConfigurator::Observer,
|
| - public ShellObserver {
|
| - public:
|
| - DisplayChangeObserverX11();
|
| - virtual ~DisplayChangeObserverX11();
|
| -
|
| - // chromeos::OutputConfigurator::StateController overrides:
|
| - virtual chromeos::OutputState GetStateForDisplayIds(
|
| - const std::vector<int64>& outputs) const OVERRIDE;
|
| -
|
| - // Overriden from chromeos::OutputConfigurator::Observer:
|
| - virtual void OnDisplayModeChanged() OVERRIDE;
|
| -
|
| - // Overriden from ShellObserver:
|
| - virtual void OnAppTerminating() OVERRIDE;
|
| -
|
| - private:
|
| - Display* xdisplay_;
|
| -
|
| - ::Window x_root_window_;
|
| -
|
| - int xrandr_event_base_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11);
|
| -};
|
| +struct Resolution;
|
|
|
| // Returns true if the size info in the output_info isn't valid
|
| // and should be ignored. This is exposed for testing.
|
| @@ -54,7 +25,12 @@ class DisplayChangeObserverX11
|
| ASH_EXPORT bool ShouldIgnoreSize(unsigned long mm_width,
|
| unsigned long mm_height);
|
|
|
| +// Returns the resolution list.
|
| +ASH_EXPORT std::vector<Resolution> GetResolutionList(
|
| + XRRScreenResources* screen_resources,
|
| + XRROutputInfo* output_info);
|
| +
|
| } // namespace internal
|
| } // namespace ash
|
|
|
| -#endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H
|
| +#endif // ASH_DISPLAY_DISPLAY_UTIL_X11_H_
|
|
|