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

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

Issue 2840903002: mash: Fix create fullscreen widget (Closed)
Patch Set: const Created 3 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
« no previous file with comments | « no previous file | ui/views/mus/desktop_window_tree_host_mus_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/desktop_window_tree_host_mus.h" 5 #include "ui/views/mus/desktop_window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // |TYPE_WINDOW| and |TYPE_PANEL| are forced to transparent as otherwise the 276 // |TYPE_WINDOW| and |TYPE_PANEL| are forced to transparent as otherwise the
277 // window is opaque and the client decorations drawn by the window manager 277 // window is opaque and the client decorations drawn by the window manager
278 // would not be seen. 278 // would not be seen.
279 const bool transparent = 279 const bool transparent =
280 params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW || 280 params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW ||
281 params.type == Widget::InitParams::TYPE_WINDOW || 281 params.type == Widget::InitParams::TYPE_WINDOW ||
282 params.type == Widget::InitParams::TYPE_PANEL; 282 params.type == Widget::InitParams::TYPE_PANEL;
283 content_window->SetTransparent(transparent); 283 content_window->SetTransparent(transparent);
284 window()->SetTransparent(transparent); 284 window()->SetTransparent(transparent);
285 285
286 window()->SetProperty(aura::client::kShowStateKey, params.show_state);
287
286 if (!params.bounds.IsEmpty()) 288 if (!params.bounds.IsEmpty())
287 SetBoundsInDIP(params.bounds); 289 SetBoundsInDIP(params.bounds);
288 290
289 cursor_manager_ = base::MakeUnique<wm::CursorManager>( 291 cursor_manager_ = base::MakeUnique<wm::CursorManager>(
290 base::MakeUnique<NativeCursorManagerMus>(window())); 292 base::MakeUnique<NativeCursorManagerMus>(window()));
291 aura::client::SetCursorClient(window(), cursor_manager_.get()); 293 aura::client::SetCursorClient(window(), cursor_manager_.get());
292 InitHost(); 294 InitHost();
293 295
294 NativeWidgetAura::SetShadowElevationFromInitParams(window(), params); 296 NativeWidgetAura::SetShadowElevationFromInitParams(window(), params);
295 297
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 } 798 }
797 const gfx::Rect old_bounds_in_pixels = GetBoundsInPixels(); 799 const gfx::Rect old_bounds_in_pixels = GetBoundsInPixels();
798 WindowTreeHostMus::SetBoundsInPixels(final_bounds_in_pixels); 800 WindowTreeHostMus::SetBoundsInPixels(final_bounds_in_pixels);
799 if (old_bounds_in_pixels.size() != final_bounds_in_pixels.size()) { 801 if (old_bounds_in_pixels.size() != final_bounds_in_pixels.size()) {
800 SendClientAreaToServer(); 802 SendClientAreaToServer();
801 SendHitTestMaskToServer(); 803 SendHitTestMaskToServer();
802 } 804 }
803 } 805 }
804 806
805 } // namespace views 807 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/mus/desktop_window_tree_host_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698