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

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

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/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/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 aura::client::SetActivationClient(hosted_window, focus_client_.get()); 694 aura::client::SetActivationClient(hosted_window, focus_client_.get());
695 screen_position_client_.reset(new ScreenPositionClientMus(window_)); 695 screen_position_client_.reset(new ScreenPositionClientMus(window_));
696 aura::client::SetScreenPositionClient(hosted_window, 696 aura::client::SetScreenPositionClient(hosted_window,
697 screen_position_client_.get()); 697 screen_position_client_.get());
698 698
699 // TODO(erg): Remove this check when ash/mus/move_event_handler.cc's 699 // TODO(erg): Remove this check when ash/mus/move_event_handler.cc's
700 // direct usage of ui::Window::SetPredefinedCursor() is switched to a 700 // direct usage of ui::Window::SetPredefinedCursor() is switched to a
701 // private method on WindowManagerClient. 701 // private method on WindowManagerClient.
702 if (!is_parallel_widget_in_window_manager()) { 702 if (!is_parallel_widget_in_window_manager()) {
703 cursor_manager_.reset(new wm::CursorManager( 703 cursor_manager_.reset(new wm::CursorManager(
704 base::WrapUnique(new NativeCursorManagerMus(window_)))); 704 base::MakeUnique<NativeCursorManagerMus>(window_)));
705 aura::client::SetCursorClient(hosted_window, cursor_manager_.get()); 705 aura::client::SetCursorClient(hosted_window, cursor_manager_.get());
706 } 706 }
707 707
708 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window)); 708 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window));
709 hosted_window->AddPreTargetHandler(focus_client_.get()); 709 hosted_window->AddPreTargetHandler(focus_client_.get());
710 hosted_window->SetLayoutManager( 710 hosted_window->SetLayoutManager(
711 new ContentWindowLayoutManager(hosted_window, content_)); 711 new ContentWindowLayoutManager(hosted_window, content_));
712 capture_client_.reset(new MusCaptureClient(hosted_window, content_, window_)); 712 capture_client_.reset(new MusCaptureClient(hosted_window, content_, window_));
713 713
714 content_->SetType(ui::wm::WINDOW_TYPE_NORMAL); 714 content_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 1428
1429 gfx::Path mask_path; 1429 gfx::Path mask_path;
1430 native_widget_delegate_->GetHitTestMask(&mask_path); 1430 native_widget_delegate_->GetHitTestMask(&mask_path);
1431 // TODO(jamescook): Use the full path for the mask. 1431 // TODO(jamescook): Use the full path for the mask.
1432 gfx::Rect mask_rect = 1432 gfx::Rect mask_rect =
1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1434 window_->SetHitTestMask(mask_rect); 1434 window_->SetHitTestMask(mask_rect);
1435 } 1435 }
1436 1436
1437 } // namespace views 1437 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.cc ('k') | ui/views/mus/native_widget_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698