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

Side by Side Diff: ui/views/mus/native_widget_mus.cc

Issue 1927203003: Add support for X11 workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed GetSavedWindowWorkspace, put command line code into browser_frame.cc Created 4 years, 7 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
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 "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "components/mus/public/cpp/property_type_converters.h" 9 #include "components/mus/public/cpp/property_type_converters.h"
10 #include "components/mus/public/cpp/window.h" 10 #include "components/mus/public/cpp/window.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 // not in either state. 600 // not in either state.
601 if (IsMinimized() || IsMaximized() || IsFullscreen()) { 601 if (IsMinimized() || IsMaximized() || IsFullscreen()) {
602 const char* kRestoreBounds_Property = 602 const char* kRestoreBounds_Property =
603 mus::mojom::WindowManager::kRestoreBounds_Property; 603 mus::mojom::WindowManager::kRestoreBounds_Property;
604 if (window_->HasSharedProperty(kRestoreBounds_Property)) 604 if (window_->HasSharedProperty(kRestoreBounds_Property))
605 return window_->GetSharedProperty<gfx::Rect>(kRestoreBounds_Property); 605 return window_->GetSharedProperty<gfx::Rect>(kRestoreBounds_Property);
606 } 606 }
607 return GetWindowBoundsInScreen(); 607 return GetWindowBoundsInScreen();
608 } 608 }
609 609
610 std::string NativeWidgetMus::GetWorkspace() const {
611 return std::string();
612 }
613
610 void NativeWidgetMus::SetBounds(const gfx::Rect& bounds) { 614 void NativeWidgetMus::SetBounds(const gfx::Rect& bounds) {
611 if (!window_tree_host_) 615 if (!window_tree_host_)
612 return; 616 return;
613 617
614 gfx::Size size(bounds.size()); 618 gfx::Size size(bounds.size());
615 const gfx::Size min_size = GetMinimumSize(); 619 const gfx::Size min_size = GetMinimumSize();
616 const gfx::Size max_size = GetMaximumSize(); 620 const gfx::Size max_size = GetMaximumSize();
617 if (!max_size.IsEmpty()) 621 if (!max_size.IsEmpty())
618 size.SetToMin(max_size); 622 size.SetToMin(max_size);
619 size.SetToMax(min_size); 623 size.SetToMax(min_size);
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 window_tree_host_->Show(); 1022 window_tree_host_->Show();
1019 GetNativeWindow()->Show(); 1023 GetNativeWindow()->Show();
1020 } else { 1024 } else {
1021 window_tree_host_->Hide(); 1025 window_tree_host_->Hide();
1022 GetNativeWindow()->Hide(); 1026 GetNativeWindow()->Hide();
1023 } 1027 }
1024 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); 1028 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
1025 } 1029 }
1026 1030
1027 } // namespace views 1031 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698