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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
7 7
8 #include <memory>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "content/browser/renderer_host/overscroll_controller_delegate.h" 14 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
15 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 15 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
16 #include "content/browser/web_contents/web_contents_view.h" 16 #include "content/browser/web_contents/web_contents_view.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "ui/aura/window_delegate.h" 18 #include "ui/aura/window_delegate.h"
19 #include "ui/aura/window_observer.h" 19 #include "ui/aura/window_observer.h"
20 #include "ui/wm/public/drag_drop_delegate.h" 20 #include "ui/wm/public/drag_drop_delegate.h"
21 21
22 namespace aura { 22 namespace aura {
23 class Window; 23 class Window;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void OnDragEntered(const ui::DropTargetEvent& event) override; 155 void OnDragEntered(const ui::DropTargetEvent& event) override;
156 int OnDragUpdated(const ui::DropTargetEvent& event) override; 156 int OnDragUpdated(const ui::DropTargetEvent& event) override;
157 void OnDragExited() override; 157 void OnDragExited() override;
158 int OnPerformDrop(const ui::DropTargetEvent& event) override; 158 int OnPerformDrop(const ui::DropTargetEvent& event) override;
159 159
160 // Overridden from aura::WindowObserver: 160 // Overridden from aura::WindowObserver:
161 void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; 161 void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
162 162
163 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, EnableDisableOverscroll); 163 FRIEND_TEST_ALL_PREFIXES(WebContentsViewAuraTest, EnableDisableOverscroll);
164 164
165 scoped_ptr<aura::Window> window_; 165 std::unique_ptr<aura::Window> window_;
166 166
167 scoped_ptr<WindowObserver> window_observer_; 167 std::unique_ptr<WindowObserver> window_observer_;
168 168
169 // The WebContentsImpl whose contents we display. 169 // The WebContentsImpl whose contents we display.
170 WebContentsImpl* web_contents_; 170 WebContentsImpl* web_contents_;
171 171
172 scoped_ptr<WebContentsViewDelegate> delegate_; 172 std::unique_ptr<WebContentsViewDelegate> delegate_;
173 173
174 blink::WebDragOperationsMask current_drag_op_; 174 blink::WebDragOperationsMask current_drag_op_;
175 175
176 scoped_ptr<DropData> current_drop_data_; 176 std::unique_ptr<DropData> current_drop_data_;
177 177
178 WebDragDestDelegate* drag_dest_delegate_; 178 WebDragDestDelegate* drag_dest_delegate_;
179 179
180 // We keep track of the render view host we're dragging over. If it changes 180 // We keep track of the render view host we're dragging over. If it changes
181 // during a drag, we need to re-send the DragEnter message. WARNING: 181 // during a drag, we need to re-send the DragEnter message. WARNING:
182 // this pointer should never be dereferenced. We only use it for comparing 182 // this pointer should never be dereferenced. We only use it for comparing
183 // pointers. 183 // pointers.
184 void* current_rvh_for_drag_; 184 void* current_rvh_for_drag_;
185 185
186 // The overscroll gesture currently in progress. 186 // The overscroll gesture currently in progress.
187 OverscrollMode current_overscroll_gesture_; 187 OverscrollMode current_overscroll_gesture_;
188 188
189 // This is the completed overscroll gesture. This is used for the animation 189 // This is the completed overscroll gesture. This is used for the animation
190 // callback that happens in response to a completed overscroll gesture. 190 // callback that happens in response to a completed overscroll gesture.
191 OverscrollMode completed_overscroll_gesture_; 191 OverscrollMode completed_overscroll_gesture_;
192 192
193 // This manages the overlay window that shows the screenshot during a history 193 // This manages the overlay window that shows the screenshot during a history
194 // navigation triggered by the overscroll gesture. 194 // navigation triggered by the overscroll gesture.
195 scoped_ptr<OverscrollNavigationOverlay> navigation_overlay_; 195 std::unique_ptr<OverscrollNavigationOverlay> navigation_overlay_;
196 196
197 scoped_ptr<GestureNavSimple> gesture_nav_simple_; 197 std::unique_ptr<GestureNavSimple> gesture_nav_simple_;
198 198
199 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); 199 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura);
200 }; 200 };
201 201
202 } // namespace content 202 } // namespace content
203 203
204 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 204 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_android.h ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698