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

Side by Side Diff: ash/frame/frame_border_hit_test_controller.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 | « ash/frame/default_header_painter_unittest.cc ('k') | ash/host/ash_window_tree_host.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/frame/frame_border_hit_test_controller.h" 5 #include "ash/frame/frame_border_hit_test_controller.h"
6 6
7 #include <memory>
8
7 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
9 #include "ash/wm/resize_handle_window_targeter.h" 11 #include "ash/wm/resize_handle_window_targeter.h"
10 #include "ash/wm/window_state_observer.h" 12 #include "ash/wm/window_state_observer.h"
11 #include "ui/aura/env.h" 13 #include "ui/aura/env.h"
12 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
13 #include "ui/aura/window_observer.h" 15 #include "ui/aura/window_observer.h"
14 #include "ui/aura/window_targeter.h" 16 #include "ui/aura/window_targeter.h"
15 #include "ui/base/hit_test.h" 17 #include "ui/base/hit_test.h"
16 #include "ui/views/widget/widget.h" 18 #include "ui/views/widget/widget.h"
17 #include "ui/views/widget/widget_delegate.h" 19 #include "ui/views/widget/widget_delegate.h"
18 #include "ui/views/window/non_client_view.h" 20 #include "ui/views/window/non_client_view.h"
19 21
20 namespace ash { 22 namespace ash {
21 23
22 FrameBorderHitTestController::FrameBorderHitTestController(views::Widget* frame) 24 FrameBorderHitTestController::FrameBorderHitTestController(views::Widget* frame)
23 : frame_window_(frame->GetNativeWindow()) { 25 : frame_window_(frame->GetNativeWindow()) {
24 frame_window_->SetEventTargeter(scoped_ptr<ui::EventTargeter>( 26 frame_window_->SetEventTargeter(std::unique_ptr<ui::EventTargeter>(
25 new ResizeHandleWindowTargeter(frame_window_, NULL))); 27 new ResizeHandleWindowTargeter(frame_window_, NULL)));
26 } 28 }
27 29
28 FrameBorderHitTestController::~FrameBorderHitTestController() { 30 FrameBorderHitTestController::~FrameBorderHitTestController() {
29 } 31 }
30 32
31 // static 33 // static
32 int FrameBorderHitTestController::NonClientHitTest( 34 int FrameBorderHitTestController::NonClientHitTest(
33 views::NonClientFrameView* view, 35 views::NonClientFrameView* view,
34 FrameCaptionButtonContainerView* caption_button_container, 36 FrameCaptionButtonContainerView* caption_button_container,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 point_in_caption_button_container); 78 point_in_caption_button_container);
77 if (caption_button_component != HTNOWHERE) 79 if (caption_button_component != HTNOWHERE)
78 return caption_button_component; 80 return caption_button_component;
79 } 81 }
80 82
81 // Caption is a safe default. 83 // Caption is a safe default.
82 return HTCAPTION; 84 return HTCAPTION;
83 } 85 }
84 86
85 } // namespace ash 87 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/default_header_painter_unittest.cc ('k') | ash/host/ash_window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698