| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/common/frame/custom_frame_view_ash.h" | 9 #include "ash/common/frame/custom_frame_view_ash.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 // state. In this implementation, we may loose the previous state, | 500 // state. In this implementation, we may loose the previous state, |
| 501 // if the previous state is fullscreen, etc. | 501 // if the previous state is fullscreen, etc. |
| 502 if (ash::wm::GetWindowState(widget_->GetNativeWindow())->IsPinned()) | 502 if (ash::wm::GetWindowState(widget_->GetNativeWindow())->IsPinned()) |
| 503 widget_->Restore(); | 503 widget_->Restore(); |
| 504 } | 504 } |
| 505 } | 505 } |
| 506 | 506 |
| 507 void ShellSurface::SetSystemUiVisibility(bool autohide) { | 507 void ShellSurface::SetSystemUiVisibility(bool autohide) { |
| 508 TRACE_EVENT1("exo", "ShellSurface::SetSystemUiVisibility", "autohide", | 508 TRACE_EVENT1("exo", "ShellSurface::SetSystemUiVisibility", "autohide", |
| 509 autohide); | 509 autohide); |
| 510 // TODO: Implemented in next CL. crbug.com/705723 | 510 ash::wm::SetAutoHideShelf(widget_->GetNativeWindow(), autohide); |
| 511 NOTIMPLEMENTED(); | |
| 512 } | 511 } |
| 513 | 512 |
| 514 void ShellSurface::SetTitle(const base::string16& title) { | 513 void ShellSurface::SetTitle(const base::string16& title) { |
| 515 TRACE_EVENT1("exo", "ShellSurface::SetTitle", "title", | 514 TRACE_EVENT1("exo", "ShellSurface::SetTitle", "title", |
| 516 base::UTF16ToUTF8(title)); | 515 base::UTF16ToUTF8(title)); |
| 517 | 516 |
| 518 title_ = title; | 517 title_ = title; |
| 519 if (widget_) | 518 if (widget_) |
| 520 widget_->UpdateWindowTitle(); | 519 widget_->UpdateWindowTitle(); |
| 521 } | 520 } |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1705 gfx::Point ShellSurface::GetMouseLocation() const { | 1704 gfx::Point ShellSurface::GetMouseLocation() const { |
| 1706 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); | 1705 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); |
| 1707 gfx::Point location = | 1706 gfx::Point location = |
| 1708 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); | 1707 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); |
| 1709 aura::Window::ConvertPointToTarget( | 1708 aura::Window::ConvertPointToTarget( |
| 1710 root_window, widget_->GetNativeWindow()->parent(), &location); | 1709 root_window, widget_->GetNativeWindow()->parent(), &location); |
| 1711 return location; | 1710 return location; |
| 1712 } | 1711 } |
| 1713 | 1712 |
| 1714 } // namespace exo | 1713 } // namespace exo |
| OLD | NEW |