Index: ash/display/display_manager.h |
diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h |
index 7cdd08cee86ffce7fd21f14ab24847a95aa2344d..83933bf957f869b476466287396ddb604e5cdd93 100644 |
--- a/ash/display/display_manager.h |
+++ b/ash/display/display_manager.h |
@@ -5,6 +5,9 @@ |
#ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ |
#define ASH_DISPLAY_DISPLAY_MANAGER_H_ |
+#include <stddef.h> |
+#include <stdint.h> |
+ |
#include <string> |
#include <vector> |
@@ -13,6 +16,7 @@ |
#include "ash/display/display_layout.h" |
#include "base/compiler_specific.h" |
#include "base/gtest_prod_util.h" |
+#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "ui/gfx/display.h" |
@@ -92,7 +96,7 @@ class ASH_EXPORT DisplayManager |
}; |
// The display ID for a virtual display assigned to a unified desktop. |
- static int64 kUnifiedDisplayId; |
+ static int64_t kUnifiedDisplayId; |
DisplayManager(); |
#if defined(OS_CHROMEOS) |
@@ -115,7 +119,7 @@ class ASH_EXPORT DisplayManager |
} |
// Returns the display id of the first display in the outupt list. |
- int64 first_display_id() const { return first_display_id_; } |
+ int64_t first_display_id() const { return first_display_id_; } |
// Initializes displays using command line flag. Returns false |
// if no command line flag was provided. |
@@ -140,7 +144,7 @@ class ASH_EXPORT DisplayManager |
const DisplayLayout& layout_relative_to_primary); |
// Returns display for given |id|; |
- const gfx::Display& GetDisplayForId(int64 id) const; |
+ const gfx::Display& GetDisplayForId(int64_t id) const; |
// Finds the display that contains |point| in screeen coordinates. |
// Returns invalid display if there is no display that can satisfy |
@@ -149,16 +153,16 @@ class ASH_EXPORT DisplayManager |
const gfx::Point& point_in_screen) const; |
// Sets the work area's |insets| to the display given by |display_id|. |
- bool UpdateWorkAreaOfDisplay(int64 display_id, const gfx::Insets& insets); |
+ bool UpdateWorkAreaOfDisplay(int64_t display_id, const gfx::Insets& insets); |
// Registers the overscan insets for the display of the specified ID. Note |
// that the insets size should be specified in DIP size. It also triggers the |
// display's bounds change. |
- void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip); |
+ void SetOverscanInsets(int64_t display_id, const gfx::Insets& insets_in_dip); |
// Sets the display's rotation for the given |source|. The new |rotation| will |
// also become active. |
- void SetDisplayRotation(int64 display_id, |
+ void SetDisplayRotation(int64_t display_id, |
gfx::Display::Rotation rotation, |
gfx::Display::RotationSource source); |
@@ -166,11 +170,11 @@ class ASH_EXPORT DisplayManager |
// ui-scale change, and device scale factor change. Returns true if it changes |
// the display resolution so that the caller needs to show a notification in |
// case the new resolution actually doesn't work. |
- bool SetDisplayMode(int64 display_id, const DisplayMode& display_mode); |
+ bool SetDisplayMode(int64_t display_id, const DisplayMode& display_mode); |
// Register per display properties. |overscan_insets| is NULL if |
// the display has no custom overscan insets. |
- void RegisterDisplayProperty(int64 display_id, |
+ void RegisterDisplayProperty(int64_t display_id, |
gfx::Display::Rotation rotation, |
float ui_scale, |
const gfx::Insets* overscan_insets, |
@@ -195,11 +199,11 @@ class ASH_EXPORT DisplayManager |
} |
// Returns the display mode of |display_id| which is currently used. |
- DisplayMode GetActiveModeForDisplayId(int64 display_id) const; |
+ DisplayMode GetActiveModeForDisplayId(int64_t display_id) const; |
// Returns the display's selected mode. This returns false and doesn't |
// set |mode_out| if the display mode is in default. |
- bool GetSelectedModeForDisplayId(int64 display_id, |
+ bool GetSelectedModeForDisplayId(int64_t display_id, |
DisplayMode* mode_out) const; |
// Tells if the virtual resolution feature is enabled. |
@@ -208,10 +212,10 @@ class ASH_EXPORT DisplayManager |
// Returns the current overscan insets for the specified |display_id|. |
// Returns an empty insets (0, 0, 0, 0) if no insets are specified for |
// the display. |
- gfx::Insets GetOverscanInsets(int64 display_id) const; |
+ gfx::Insets GetOverscanInsets(int64_t display_id) const; |
// Sets the color calibration of the display to |profile|. |
- void SetColorCalibrationProfile(int64 display_id, |
+ void SetColorCalibrationProfile(int64_t display_id, |
ui::ColorCalibrationProfile profile); |
// Called when display configuration has changed. The new display |
@@ -242,7 +246,7 @@ class ASH_EXPORT DisplayManager |
// Returns true if the display specified by |display_id| is currently |
// connected and active. (mirroring display isn't active, for example). |
- bool IsActiveDisplayId(int64 display_id) const; |
+ bool IsActiveDisplayId(int64_t display_id) const; |
// Returns the number of connected displays. This returns 2 |
// when displays are mirrored. |
@@ -250,7 +254,7 @@ class ASH_EXPORT DisplayManager |
// Returns the mirroring status. |
bool IsInMirrorMode() const; |
- int64 mirroring_display_id() const { return mirroring_display_id_; } |
+ int64_t mirroring_display_id() const { return mirroring_display_id_; } |
const DisplayList& software_mirroring_display_list() const { |
return software_mirroring_display_list_; |
} |
@@ -264,19 +268,19 @@ class ASH_EXPORT DisplayManager |
// Returns the display used for software mirrroring. Returns invalid |
// display if not found. |
- const gfx::Display GetMirroringDisplayById(int64 id) const; |
+ const gfx::Display GetMirroringDisplayById(int64_t id) const; |
// Retuns the display info associated with |display_id|. |
- const DisplayInfo& GetDisplayInfo(int64 display_id) const; |
+ const DisplayInfo& GetDisplayInfo(int64_t display_id) const; |
// Returns the human-readable name for the display |id|. |
- std::string GetDisplayNameForId(int64 id); |
+ std::string GetDisplayNameForId(int64_t id); |
// Returns the display id that is capable of UI scaling. On device, |
// this returns internal display's ID if its device scale factor is 2, |
// or invalid ID if such internal display doesn't exist. On linux |
// desktop, this returns the first display ID. |
- int64 GetDisplayIdForUIScaling() const; |
+ int64_t GetDisplayIdForUIScaling() const; |
// Change the mirror mode. |
void SetMirrorMode(bool mirrored); |
@@ -307,8 +311,7 @@ class ASH_EXPORT DisplayManager |
void ReconfigureDisplays(); |
// Update the bounds of the display given by |display_id|. |
- bool UpdateDisplayBounds(int64 display_id, |
- const gfx::Rect& new_bounds); |
+ bool UpdateDisplayBounds(int64_t display_id, const gfx::Rect& new_bounds); |
// Creates mirror window asynchronously if the software mirror mode |
// is enabled. |
@@ -356,7 +359,7 @@ private: |
// used to mirror the content is removed from the |display_info_list|. |
void CreateSoftwareMirroringDisplayInfo(DisplayInfoList* display_info_list); |
- gfx::Display* FindDisplayForId(int64 id); |
+ gfx::Display* FindDisplayForId(int64_t id); |
// Add the mirror display's display info if the software based |
// mirroring is in use. |
@@ -373,13 +376,13 @@ private: |
void OnDisplayInfoUpdated(const DisplayInfo& display_info); |
// Creates a display object from the DisplayInfo for |display_id|. |
- gfx::Display CreateDisplayFromDisplayInfoById(int64 display_id); |
+ gfx::Display CreateDisplayFromDisplayInfoById(int64_t display_id); |
// Creates a display object from the DisplayInfo for |display_id| for |
// mirroring. The size of the display will be scaled using |scale| |
// with the offset using |origin|. |
gfx::Display CreateMirroringDisplayFromDisplayInfoById( |
- int64 display_id, |
+ int64_t display_id, |
const gfx::Point& origin, |
float scale); |
@@ -408,7 +411,7 @@ private: |
scoped_ptr<DisplayLayoutStore> layout_store_; |
- int64 first_display_id_; |
+ int64_t first_display_id_; |
// List of current active displays. |
DisplayList active_display_list_; |
@@ -418,10 +421,10 @@ private: |
bool force_bounds_changed_; |
// The mapping from the display ID to its internal data. |
- std::map<int64, DisplayInfo> display_info_; |
+ std::map<int64_t, DisplayInfo> display_info_; |
// Selected display modes for displays. Key is the displays' ID. |
- std::map<int64, DisplayMode> display_modes_; |
+ std::map<int64_t, DisplayMode> display_modes_; |
// When set to true, the host window's resize event updates |
// the display's size. This is set to true when running on |
@@ -433,7 +436,7 @@ private: |
MultiDisplayMode multi_display_mode_; |
MultiDisplayMode current_default_multi_display_mode_; |
- int64 mirroring_display_id_; |
+ int64_t mirroring_display_id_; |
DisplayList software_mirroring_display_list_; |
// User preference for rotation lock of the internal display. |