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

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

Issue 1784573002: mus: Client-side implementation of modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b548402_modal_windows_server
Patch Set: Added early out Created 4 years, 9 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/mus/public/cpp/window.h ('k') | no next file » | 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 "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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 mus::mojom::WindowManager::kWindowTitle_Property, title); 474 mus::mojom::WindowManager::kWindowTitle_Property, title);
475 return true; 475 return true;
476 } 476 }
477 477
478 void NativeWidgetMus::SetWindowIcons(const gfx::ImageSkia& window_icon, 478 void NativeWidgetMus::SetWindowIcons(const gfx::ImageSkia& window_icon,
479 const gfx::ImageSkia& app_icon) { 479 const gfx::ImageSkia& app_icon) {
480 // NOTIMPLEMENTED(); 480 // NOTIMPLEMENTED();
481 } 481 }
482 482
483 void NativeWidgetMus::InitModalType(ui::ModalType modal_type) { 483 void NativeWidgetMus::InitModalType(ui::ModalType modal_type) {
484 // NOTIMPLEMENTED(); 484 if (modal_type != ui::MODAL_TYPE_NONE)
485 window_->SetModal();
485 } 486 }
486 487
487 gfx::Rect NativeWidgetMus::GetWindowBoundsInScreen() const { 488 gfx::Rect NativeWidgetMus::GetWindowBoundsInScreen() const {
488 return window_ ? window_->GetBoundsInRoot() : gfx::Rect(); 489 return window_ ? window_->GetBoundsInRoot() : gfx::Rect();
489 } 490 }
490 491
491 gfx::Rect NativeWidgetMus::GetClientAreaBoundsInScreen() const { 492 gfx::Rect NativeWidgetMus::GetClientAreaBoundsInScreen() const {
492 // View-to-screen coordinate system transformations depend on this returning 493 // View-to-screen coordinate system transformations depend on this returning
493 // the full window bounds, for example View::ConvertPointToScreen(). 494 // the full window bounds, for example View::ConvertPointToScreen().
494 return GetWindowBoundsInScreen(); 495 return GetWindowBoundsInScreen();
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 856
856 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { 857 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) {
857 native_widget_delegate_->OnGestureEvent(event); 858 native_widget_delegate_->OnGestureEvent(event);
858 } 859 }
859 860
860 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { 861 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) {
861 GetWidget()->Close(); 862 GetWidget()->Close();
862 } 863 }
863 864
864 } // namespace views 865 } // namespace views
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698