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

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

Issue 2098033002: Changes NativeWidgetMus to honor layer type from InitParms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | 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/callback.h" 7 #include "base/callback.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 aura::client::SetCursorClient(hosted_window, cursor_manager_.get()); 704 aura::client::SetCursorClient(hosted_window, cursor_manager_.get());
705 } 705 }
706 706
707 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window)); 707 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window));
708 hosted_window->AddPreTargetHandler(focus_client_.get()); 708 hosted_window->AddPreTargetHandler(focus_client_.get());
709 hosted_window->SetLayoutManager( 709 hosted_window->SetLayoutManager(
710 new ContentWindowLayoutManager(hosted_window, content_)); 710 new ContentWindowLayoutManager(hosted_window, content_));
711 capture_client_.reset(new MusCaptureClient(hosted_window, content_, window_)); 711 capture_client_.reset(new MusCaptureClient(hosted_window, content_, window_));
712 712
713 content_->SetType(ui::wm::WINDOW_TYPE_NORMAL); 713 content_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
714 content_->Init(ui::LAYER_TEXTURED); 714 content_->Init(params.layer_type);
715 if (window_->visible()) 715 if (window_->visible())
716 content_->Show(); 716 content_->Show();
717 content_->SetTransparent(true); 717 content_->SetTransparent(true);
718 content_->SetFillsBoundsCompletely(false); 718 content_->SetFillsBoundsCompletely(false);
719 hosted_window->AddChild(content_); 719 hosted_window->AddChild(content_);
720 720
721 // Set-up transiency if appropriate. 721 // Set-up transiency if appropriate.
722 if (params.parent && !params.child) { 722 if (params.parent && !params.child) {
723 aura::Window* parent_root = params.parent->GetRootWindow(); 723 aura::Window* parent_root = params.parent->GetRootWindow();
724 mus::Window* parent_mus = parent_root->GetProperty(kMusWindow); 724 mus::Window* parent_mus = parent_root->GetProperty(kMusWindow);
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1400
1401 gfx::Path mask_path; 1401 gfx::Path mask_path;
1402 native_widget_delegate_->GetHitTestMask(&mask_path); 1402 native_widget_delegate_->GetHitTestMask(&mask_path);
1403 // TODO(jamescook): Use the full path for the mask. 1403 // TODO(jamescook): Use the full path for the mask.
1404 gfx::Rect mask_rect = 1404 gfx::Rect mask_rect =
1405 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1405 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1406 window_->SetHitTestMask(mask_rect); 1406 window_->SetHitTestMask(mask_rect);
1407 } 1407 }
1408 1408
1409 } // namespace views 1409 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698