| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/ui/ws/server_window.h" | 5 #include "services/ui/ws/server_window.h" |
| 6 | 6 |
| 7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 additional_client_areas_ = additional_client_areas; | 175 additional_client_areas_ = additional_client_areas; |
| 176 client_area_ = insets; | 176 client_area_ = insets; |
| 177 FOR_EACH_OBSERVER( | 177 FOR_EACH_OBSERVER( |
| 178 ServerWindowObserver, observers_, | 178 ServerWindowObserver, observers_, |
| 179 OnWindowClientAreaChanged(this, insets, additional_client_areas)); | 179 OnWindowClientAreaChanged(this, insets, additional_client_areas)); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ServerWindow::SetHitTestMask(const gfx::Rect& mask) { | 182 void ServerWindow::SetHitTestMask(const gfx::Rect& mask) { |
| 183 hit_test_mask_.reset(new gfx::Rect(mask)); | 183 hit_test_mask_ = base::MakeUnique<gfx::Rect>(mask); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void ServerWindow::ClearHitTestMask() { | 186 void ServerWindow::ClearHitTestMask() { |
| 187 hit_test_mask_.reset(); | 187 hit_test_mask_.reset(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void ServerWindow::SetCanAcceptDrops(bool accepts_drops) { | 190 void ServerWindow::SetCanAcceptDrops(bool accepts_drops) { |
| 191 accepts_drops_ = accepts_drops; | 191 accepts_drops_ = accepts_drops; |
| 192 } | 192 } |
| 193 | 193 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 if (surface) | 366 if (surface) |
| 367 surface->DestroySurfacesScheduledForDestruction(); | 367 surface->DestroySurfacesScheduledForDestruction(); |
| 368 | 368 |
| 369 surface = surface_manager_->GetUnderlaySurface(); | 369 surface = surface_manager_->GetUnderlaySurface(); |
| 370 if (surface) | 370 if (surface) |
| 371 surface->DestroySurfacesScheduledForDestruction(); | 371 surface->DestroySurfacesScheduledForDestruction(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 ServerWindowSurfaceManager* ServerWindow::GetOrCreateSurfaceManager() { | 374 ServerWindowSurfaceManager* ServerWindow::GetOrCreateSurfaceManager() { |
| 375 if (!surface_manager_.get()) | 375 if (!surface_manager_.get()) |
| 376 surface_manager_.reset(new ServerWindowSurfaceManager(this)); | 376 surface_manager_ = base::MakeUnique<ServerWindowSurfaceManager>(this); |
| 377 return surface_manager_.get(); | 377 return surface_manager_.get(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void ServerWindow::SetUnderlayOffset(const gfx::Vector2d& offset) { | 380 void ServerWindow::SetUnderlayOffset(const gfx::Vector2d& offset) { |
| 381 if (offset == underlay_offset_) | 381 if (offset == underlay_offset_) |
| 382 return; | 382 return; |
| 383 | 383 |
| 384 underlay_offset_ = offset; | 384 underlay_offset_ = offset; |
| 385 delegate_->OnScheduleWindowPaint(this); | 385 delegate_->OnScheduleWindowPaint(this); |
| 386 } | 386 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 } | 462 } |
| 463 | 463 |
| 464 // static | 464 // static |
| 465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { | 465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { |
| 466 return &window->stacking_target_; | 466 return &window->stacking_target_; |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace ws | 469 } // namespace ws |
| 470 | 470 |
| 471 } // namespace ui | 471 } // namespace ui |
| OLD | NEW |