Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: components/exo/shell_surface.cc

Issue 2777373002: Add set_autohide_systemui to wayland protocol (Closed)
Patch Set: Add set_systemui_visibility to wayland Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/exo/shell_surface.h ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } else { 497 } else {
498 // At the moment, we cannot just unpin the window state, due to ash 498 // At the moment, we cannot just unpin the window state, due to ash
499 // implementation. Instead, we call Restore() to unpin, if it is Pinned 499 // implementation. Instead, we call Restore() to unpin, if it is Pinned
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) {
508 TRACE_EVENT1("exo", "ShellSurface::SetSystemUiVisibility", "autohide",
509 autohide);
510 // TODO: Implemented in next CL. crbug.com/705723
511 NOTIMPLEMENTED();
512 }
513
507 void ShellSurface::SetTitle(const base::string16& title) { 514 void ShellSurface::SetTitle(const base::string16& title) {
508 TRACE_EVENT1("exo", "ShellSurface::SetTitle", "title", 515 TRACE_EVENT1("exo", "ShellSurface::SetTitle", "title",
509 base::UTF16ToUTF8(title)); 516 base::UTF16ToUTF8(title));
510 517
511 title_ = title; 518 title_ = title;
512 if (widget_) 519 if (widget_)
513 widget_->UpdateWindowTitle(); 520 widget_->UpdateWindowTitle();
514 } 521 }
515 522
516 void ShellSurface::SetSystemModal(bool system_modal) { 523 void ShellSurface::SetSystemModal(bool system_modal) {
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 gfx::Point ShellSurface::GetMouseLocation() const { 1705 gfx::Point ShellSurface::GetMouseLocation() const {
1699 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); 1706 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow();
1700 gfx::Point location = 1707 gfx::Point location =
1701 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); 1708 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot();
1702 aura::Window::ConvertPointToTarget( 1709 aura::Window::ConvertPointToTarget(
1703 root_window, widget_->GetNativeWindow()->parent(), &location); 1710 root_window, widget_->GetNativeWindow()->parent(), &location);
1704 return location; 1711 return location;
1705 } 1712 }
1706 1713
1707 } // namespace exo 1714 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/shell_surface.h ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698