diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-28 15:12:06 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-28 15:12:06 +0000 |
commit | 93c7e56296435ea48a0b25a50f662243b6f62980 (patch) | |
tree | 3c3b10ee5fabcf141f2196f964cf1b620793f511 /ash/display/display_controller.h | |
parent | d5ba6eb9aa57076cf046cf2834751b523dc7c471 (diff) | |
download | chromium_src-93c7e56296435ea48a0b25a50f662243b6f62980.zip chromium_src-93c7e56296435ea48a0b25a50f662243b6f62980.tar.gz chromium_src-93c7e56296435ea48a0b25a50f662243b6f62980.tar.bz2 |
Move DisplayLayout out from display_controller.h
Remove unnecessary includes
BUG=253991
R=jamescook@chromium.org
Review URL: https://codereview.chromium.org/18080004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display/display_controller.h')
-rw-r--r-- | ash/display/display_controller.h | 54 |
1 files changed, 7 insertions, 47 deletions
diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h index bfe86ff..948a7ad 100644 --- a/ash/display/display_controller.h +++ b/ash/display/display_controller.h @@ -9,13 +9,13 @@ #include <vector> #include "ash/ash_export.h" +#include "ash/display/display_layout.h" #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/time/time.h" -#include "ui/gfx/display.h" #include "ui/gfx/display_observer.h" namespace aura { @@ -28,6 +28,12 @@ class Value; template <typename T> class JSONValueConverter; } +namespace gfx { +class Display; +class Insets; +class Point; +} + namespace ash { namespace internal { class DisplayManager; @@ -35,52 +41,6 @@ class FocusActivationStore; class RootWindowController; } -typedef std::pair<int64, int64> DisplayIdPair; - -struct ASH_EXPORT DisplayLayout { - // Layout options where the secondary display should be positioned. - enum Position { - TOP, - RIGHT, - BOTTOM, - LEFT - }; - // Factory method to create DisplayLayout from ints. The |mirrored| is - // set to false and |primary_id| is set to gfx::Display::kInvalidDisplayId. - // Used for persistence and webui. - static DisplayLayout FromInts(int position, int offsets); - - DisplayLayout(); - DisplayLayout(Position position, int offset); - - // Returns an inverted display layout. - DisplayLayout Invert() const WARN_UNUSED_RESULT; - - // Converter functions to/from base::Value. - static bool ConvertFromValue(const base::Value& value, DisplayLayout* layout); - static bool ConvertToValue(const DisplayLayout& layout, base::Value* value); - - // This method is used by base::JSONValueConverter, you don't need to call - // this directly. Instead consider using converter functions above. - static void RegisterJSONConverter( - base::JSONValueConverter<DisplayLayout>* converter); - - Position position; - - // The offset of the position of the secondary display. The offset is - // based on the top/left edge of the primary display. - int offset; - - // True if displays are mirrored. - bool mirrored; - - // The id of the display used as a primary display. - int64 primary_id; - - // Returns string representation of the layout for debugging/testing. - std::string ToString() const; -}; - // DisplayController owns and maintains RootWindows for each attached // display, keeping them in sync with display configuration changes. class ASH_EXPORT DisplayController : public gfx::DisplayObserver { |