| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/shell_surface.h" | 5 #include "components/exo/shell_surface.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/shell_window_ids.h" | 8 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/common/wm/window_resizer.h" | 9 #include "ash/common/wm/window_resizer.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 new base::trace_event::TracedValue()); | 428 new base::trace_event::TracedValue()); |
| 429 value->SetString("title", base::UTF16ToUTF8(title_)); | 429 value->SetString("title", base::UTF16ToUTF8(title_)); |
| 430 value->SetString("application_id", application_id_); | 430 value->SetString("application_id", application_id_); |
| 431 return value; | 431 return value; |
| 432 } | 432 } |
| 433 | 433 |
| 434 //////////////////////////////////////////////////////////////////////////////// | 434 //////////////////////////////////////////////////////////////////////////////// |
| 435 // SurfaceDelegate overrides: | 435 // SurfaceDelegate overrides: |
| 436 | 436 |
| 437 void ShellSurface::OnSurfaceCommit() { | 437 void ShellSurface::OnSurfaceCommit() { |
| 438 surface_->CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); |
| 438 surface_->CommitSurfaceHierarchy(); | 439 surface_->CommitSurfaceHierarchy(); |
| 439 | 440 |
| 440 if (enabled() && !widget_) | 441 if (enabled() && !widget_) |
| 441 CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL); | 442 CreateShellSurfaceWidget(ui::SHOW_STATE_NORMAL); |
| 442 | 443 |
| 443 // Apply the accumulated pending origin offset to reflect acknowledged | 444 // Apply the accumulated pending origin offset to reflect acknowledged |
| 444 // configure requests. | 445 // configure requests. |
| 445 origin_ += pending_origin_offset_; | 446 origin_ += pending_origin_offset_; |
| 446 pending_origin_offset_ = gfx::Vector2d(); | 447 pending_origin_offset_ = gfx::Vector2d(); |
| 447 | 448 |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 if (widget_->GetNativeWindow()->bounds() != new_widget_bounds) | 1020 if (widget_->GetNativeWindow()->bounds() != new_widget_bounds) |
| 1020 widget_->SetBounds(new_widget_bounds); | 1021 widget_->SetBounds(new_widget_bounds); |
| 1021 ignore_window_bounds_changes_ = false; | 1022 ignore_window_bounds_changes_ = false; |
| 1022 | 1023 |
| 1023 // A change to the widget size requires surface bounds to be re-adjusted. | 1024 // A change to the widget size requires surface bounds to be re-adjusted. |
| 1024 surface_->window()->SetBounds( | 1025 surface_->window()->SetBounds( |
| 1025 gfx::Rect(GetSurfaceOrigin(), surface_->window()->layer()->size())); | 1026 gfx::Rect(GetSurfaceOrigin(), surface_->window()->layer()->size())); |
| 1026 } | 1027 } |
| 1027 | 1028 |
| 1028 } // namespace exo | 1029 } // namespace exo |
| OLD | NEW |