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

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

Issue 1035263002: Add service registration for Mojo services defined under chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "content/public/browser/web_contents_user_data.h" 10 #include "content/public/browser/web_contents_user_data.h"
(...skipping 16 matching lines...) Expand all
27 friend class content::WebContentsUserData<ChromeExtensionWebContentsObserver>; 27 friend class content::WebContentsUserData<ChromeExtensionWebContentsObserver>;
28 28
29 explicit ChromeExtensionWebContentsObserver( 29 explicit ChromeExtensionWebContentsObserver(
30 content::WebContents* web_contents); 30 content::WebContents* web_contents);
31 ~ChromeExtensionWebContentsObserver() override; 31 ~ChromeExtensionWebContentsObserver() override;
32 32
33 // content::WebContentsObserver overrides. 33 // content::WebContentsObserver overrides.
34 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 34 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
35 bool OnMessageReceived(const IPC::Message& message, 35 bool OnMessageReceived(const IPC::Message& message,
36 content::RenderFrameHost* render_frame_host) override; 36 content::RenderFrameHost* render_frame_host) override;
37 void RegisterMojoServices(content::RenderFrameHost* render_frame_host,
mark a. foltz 2015/03/27 20:24:11 Usually observers don't expose methods to callers
Kevin M 2015/03/27 22:42:37 Moved this out of the WebContentsObserver override
Sam McNally 2015/03/31 23:38:51 This might be better off as a method in Extensions
Kevin M 2015/04/01 23:23:50 Done, thanks for the suggestion.
38 const Extension* extension) override;
37 39
38 // Adds a message to the extensions ErrorConsole. 40 // Adds a message to the extensions ErrorConsole.
39 void OnDetailedConsoleMessageAdded(const base::string16& message, 41 void OnDetailedConsoleMessageAdded(const base::string16& message,
40 const base::string16& source, 42 const base::string16& source,
41 const StackTrace& stack_trace, 43 const StackTrace& stack_trace,
42 int32 severity_level); 44 int32 severity_level);
43 45
44 // Reloads an extension if it is on the terminated list. 46 // Reloads an extension if it is on the terminated list.
45 void ReloadIfTerminated(content::RenderViewHost* render_view_host); 47 void ReloadIfTerminated(content::RenderViewHost* render_view_host);
46 48
47 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionWebContentsObserver); 49 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionWebContentsObserver);
48 }; 50 };
49 51
50 } // namespace extensions 52 } // namespace extensions
51 53
52 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 54 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698