OLD | NEW |
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_EXTENSION_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // NULL if the render view host is not for a valid extension. | 46 // NULL if the render view host is not for a valid extension. |
47 const Extension* GetExtension(content::RenderViewHost* render_view_host); | 47 const Extension* GetExtension(content::RenderViewHost* render_view_host); |
48 | 48 |
49 // Updates ViewType for RenderViewHost based on GetViewType(web_contents()). | 49 // Updates ViewType for RenderViewHost based on GetViewType(web_contents()). |
50 void NotifyRenderViewType(content::RenderViewHost* render_view_host); | 50 void NotifyRenderViewType(content::RenderViewHost* render_view_host); |
51 | 51 |
52 // Returns the extension or app ID associated with a render view host. Returns | 52 // Returns the extension or app ID associated with a render view host. Returns |
53 // the empty string if the render view host is not for a valid extension. | 53 // the empty string if the render view host is not for a valid extension. |
54 static std::string GetExtensionId(content::RenderViewHost* render_view_host); | 54 static std::string GetExtensionId(content::RenderViewHost* render_view_host); |
55 | 55 |
| 56 // Registers Mojo services with render_frame_host's ServiceRegistry. |
| 57 // A subclass should invoke this method to register all Mojo services. |
| 58 virtual void RegisterMojoServices(content::RenderFrameHost* render_frame_host, |
| 59 const Extension* extension); |
| 60 |
56 private: | 61 private: |
57 // The BrowserContext associated with the WebContents being observed. | 62 // The BrowserContext associated with the WebContents being observed. |
58 content::BrowserContext* browser_context_; | 63 content::BrowserContext* browser_context_; |
59 | 64 |
60 DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver); | 65 DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver); |
61 }; | 66 }; |
62 | 67 |
63 } // namespace extensions | 68 } // namespace extensions |
64 | 69 |
65 #endif // EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ | 70 #endif // EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |