| Index: ash/display/multi_display_manager.cc
|
| diff --git a/ash/display/multi_display_manager.cc b/ash/display/multi_display_manager.cc
|
| index fa39acea75e7ffd32edc40dafb1a250f148bf400..43e05bd72070fd6ae2c38aa1a182c0c6858aea0e 100644
|
| --- a/ash/display/multi_display_manager.cc
|
| +++ b/ash/display/multi_display_manager.cc
|
| @@ -53,18 +53,13 @@ MultiDisplayManager::~MultiDisplayManager() {
|
| }
|
|
|
| // static
|
| -void MultiDisplayManager::AddRemoveDisplay() {
|
| - MultiDisplayManager* manager = static_cast<MultiDisplayManager*>(
|
| - aura::Env::GetInstance()->display_manager());
|
| - manager->AddRemoveDisplayImpl();
|
| -}
|
| -
|
| void MultiDisplayManager::CycleDisplay() {
|
| MultiDisplayManager* manager = static_cast<MultiDisplayManager*>(
|
| aura::Env::GetInstance()->display_manager());
|
| manager->CycleDisplayImpl();
|
| }
|
|
|
| +// static
|
| void MultiDisplayManager::ToggleDisplayScale() {
|
| MultiDisplayManager* manager = static_cast<MultiDisplayManager*>(
|
| aura::Env::GetInstance()->display_manager());
|
| @@ -216,8 +211,10 @@ void MultiDisplayManager::OnRootWindowResized(const aura::RootWindow* root,
|
| const gfx::Size& old_size) {
|
| if (!use_fullscreen_host_window()) {
|
| gfx::Display& display = FindDisplayForRootWindow(root);
|
| - display.SetSize(root->GetHostSize());
|
| - NotifyBoundsChanged(display);
|
| + if (display.size() != root->GetHostSize()) {
|
| + display.SetSize(root->GetHostSize());
|
| + NotifyBoundsChanged(display);
|
| + }
|
| }
|
| }
|
|
|
| @@ -235,7 +232,7 @@ void MultiDisplayManager::Init() {
|
| AddDisplayFromSpec(std::string() /* default */);
|
| }
|
|
|
| -void MultiDisplayManager::AddRemoveDisplayImpl() {
|
| +void MultiDisplayManager::CycleDisplayImpl() {
|
| std::vector<gfx::Display> new_displays;
|
| if (displays_.size() > 1) {
|
| // Remove if there is more than one display.
|
| @@ -251,19 +248,6 @@ void MultiDisplayManager::AddRemoveDisplayImpl() {
|
| OnNativeDisplaysChanged(new_displays);
|
| }
|
|
|
| -void MultiDisplayManager::CycleDisplayImpl() {
|
| - if (displays_.size() > 1) {
|
| - std::vector<gfx::Display> new_displays;
|
| - for (Displays::const_iterator iter = displays_.begin() + 1;
|
| - iter != displays_.end(); ++iter) {
|
| - gfx::Display display = *iter;
|
| - new_displays.push_back(display);
|
| - }
|
| - new_displays.push_back(displays_.front());
|
| - OnNativeDisplaysChanged(new_displays);
|
| - }
|
| -}
|
| -
|
| void MultiDisplayManager::ScaleDisplayImpl() {
|
| if (displays_.size() > 0) {
|
| std::vector<gfx::Display> new_displays;
|
|
|