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

Side by Side Diff: headless/lib/browser/headless_web_contents_impl.h

Issue 1854043002: convert //headless 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 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 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_
6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ 6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_
7 7
8 #include "headless/public/headless_web_contents.h" 8 #include "headless/public/headless_web_contents.h"
9 9
10 #include <memory>
10 #include <unordered_map> 11 #include <unordered_map>
11 12
12 namespace aura { 13 namespace aura {
13 class Window; 14 class Window;
14 } 15 }
15 16
16 namespace content { 17 namespace content {
17 class WebContents; 18 class WebContents;
18 class BrowserContext; 19 class BrowserContext;
19 } 20 }
(...skipping 17 matching lines...) Expand all
37 content::WebContents* web_contents() const; 38 content::WebContents* web_contents() const;
38 39
39 private: 40 private:
40 friend class HeadlessBrowserImpl; 41 friend class HeadlessBrowserImpl;
41 42
42 HeadlessWebContentsImpl(content::BrowserContext* context, 43 HeadlessWebContentsImpl(content::BrowserContext* context,
43 aura::Window* parent_window, 44 aura::Window* parent_window,
44 const gfx::Size& initial_size); 45 const gfx::Size& initial_size);
45 46
46 class Delegate; 47 class Delegate;
47 scoped_ptr<Delegate> web_contents_delegate_; 48 std::unique_ptr<Delegate> web_contents_delegate_;
48 scoped_ptr<content::WebContents> web_contents_; 49 std::unique_ptr<content::WebContents> web_contents_;
49 50
50 using ObserverMap = 51 using ObserverMap =
51 std::unordered_map<HeadlessWebContents::Observer*, 52 std::unordered_map<HeadlessWebContents::Observer*,
52 scoped_ptr<WebContentsObserverAdapter>>; 53 std::unique_ptr<WebContentsObserverAdapter>>;
53 ObserverMap observer_map_; 54 ObserverMap observer_map_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); 56 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl);
56 }; 57 };
57 58
58 } // namespace headless 59 } // namespace headless
59 60
60 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ 61 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_url_request_context_getter.cc ('k') | headless/lib/browser/headless_web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698