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

Side by Side Diff: chrome/browser/extensions/chrome_extension_web_contents_observer.h

Issue 2846413002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: Created 3 years, 7 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 CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "content/public/browser/web_contents_user_data.h" 13 #include "content/public/browser/web_contents_user_data.h"
14 #include "extensions/browser/extension_web_contents_observer.h" 14 #include "extensions/browser/extension_web_contents_observer.h"
15 #include "extensions/common/stack_frame.h" 15 #include "extensions/common/stack_frame.h"
16 16
17 namespace content { 17 namespace content {
18 class RenderFrameHost; 18 class RenderFrameHost;
19 } 19 }
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 // An ExtensionWebContentsObserver that adds support for the extension error 23 // An ExtensionWebContentsObserver that adds support for the extension error
24 // console, reloading crashed extensions and routing extension messages between 24 // console, reloading crashed extensions and routing extension messages between
25 // renderers. 25 // renderers.
26 class ChromeExtensionWebContentsObserver 26 class ChromeExtensionWebContentsObserver
27 : public ExtensionWebContentsObserver, 27 : public ExtensionWebContentsObserver,
28 public content::WebContentsUserData<ChromeExtensionWebContentsObserver> { 28 public content::WebContentsUserData<ChromeExtensionWebContentsObserver> {
29 public:
30 ~ChromeExtensionWebContentsObserver() override;
31
29 private: 32 private:
30 friend class content::WebContentsUserData<ChromeExtensionWebContentsObserver>; 33 friend class content::WebContentsUserData<ChromeExtensionWebContentsObserver>;
31 34
32 explicit ChromeExtensionWebContentsObserver( 35 explicit ChromeExtensionWebContentsObserver(
33 content::WebContents* web_contents); 36 content::WebContents* web_contents);
34 ~ChromeExtensionWebContentsObserver() override;
35 37
36 // ExtensionWebContentsObserver: 38 // ExtensionWebContentsObserver:
37 void InitializeRenderFrame( 39 void InitializeRenderFrame(
38 content::RenderFrameHost* render_frame_host) override; 40 content::RenderFrameHost* render_frame_host) override;
39 41
40 // content::WebContentsObserver overrides. 42 // content::WebContentsObserver overrides.
41 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 43 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
42 void DidFinishNavigation( 44 void DidFinishNavigation(
43 content::NavigationHandle* navigation_handle) override; 45 content::NavigationHandle* navigation_handle) override;
44 46
(...skipping 15 matching lines...) Expand all
60 // Determines which bucket of a synthetic field trial this client belongs 62 // Determines which bucket of a synthetic field trial this client belongs
61 // to and sets it. 63 // to and sets it.
62 void SetExtensionIsolationTrial(content::RenderFrameHost* render_frame_host); 64 void SetExtensionIsolationTrial(content::RenderFrameHost* render_frame_host);
63 65
64 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionWebContentsObserver); 66 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionWebContentsObserver);
65 }; 67 };
66 68
67 } // namespace extensions 69 } // namespace extensions
68 70
69 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 71 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/offscreen_tab.h ('k') | chrome/browser/extensions/user_script_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698