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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_find_helper.h

Issue 1909773002: Convert //extensions/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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <vector> 10 #include <vector>
10 11
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 "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "third_party/WebKit/public/web/WebFindOptions.h" 17 #include "third_party/WebKit/public/web/WebFindOptions.h"
18 #include "ui/gfx/geometry/rect.h" 18 #include "ui/gfx/geometry/rect.h"
19 19
20 namespace extensions { 20 namespace extensions {
21 class WebViewInternalFindFunction; 21 class WebViewInternalFindFunction;
22 class WebViewGuest; 22 class WebViewGuest;
23 23
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 }; 168 };
169 169
170 // Pointer to the webview that is being helped. 170 // Pointer to the webview that is being helped.
171 WebViewGuest* const webview_guest_; 171 WebViewGuest* const webview_guest_;
172 172
173 // A counter to generate a unique request id for a find request. 173 // A counter to generate a unique request id for a find request.
174 // We only need the ids to be unique for a given WebViewGuest. 174 // We only need the ids to be unique for a given WebViewGuest.
175 int current_find_request_id_; 175 int current_find_request_id_;
176 176
177 // Stores aggregated find results and other info for the |findupdate| event. 177 // Stores aggregated find results and other info for the |findupdate| event.
178 scoped_ptr<FindUpdateEvent> find_update_event_; 178 std::unique_ptr<FindUpdateEvent> find_update_event_;
179 179
180 // Pointer to the first request of the current find session. find_info_map_ 180 // Pointer to the first request of the current find session. find_info_map_
181 // retains ownership. 181 // retains ownership.
182 scoped_refptr<FindInfo> current_find_session_; 182 scoped_refptr<FindInfo> current_find_session_;
183 183
184 // Stores each find request's information by request_id so that its callback 184 // Stores each find request's information by request_id so that its callback
185 // function can be called when its find results are available. 185 // function can be called when its find results are available.
186 using FindInfoMap = std::map<int, scoped_refptr<FindInfo>>; 186 using FindInfoMap = std::map<int, scoped_refptr<FindInfo>>;
187 FindInfoMap find_info_map_; 187 FindInfoMap find_info_map_;
188 188
189 DISALLOW_COPY_AND_ASSIGN(WebViewFindHelper); 189 DISALLOW_COPY_AND_ASSIGN(WebViewFindHelper);
190 }; 190 };
191 191
192 } // namespace extensions 192 } // namespace extensions
193 193
194 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_ 194 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_FIND_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698