| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, | 93 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, |
| 94 const content::LoadCommittedDetails& details, | 94 const content::LoadCommittedDetails& details, |
| 95 const content::FrameNavigateParams& params) override; | 95 const content::FrameNavigateParams& params) override; |
| 96 | 96 |
| 97 // Subclasses should call this first before doing their own message handling. | 97 // Subclasses should call this first before doing their own message handling. |
| 98 bool OnMessageReceived(const IPC::Message& message, | 98 bool OnMessageReceived(const IPC::Message& message, |
| 99 content::RenderFrameHost* render_frame_host) override; | 99 content::RenderFrameHost* render_frame_host) override; |
| 100 | 100 |
| 101 // Per the documentation in WebContentsObserver, these two methods are invoked | 101 // Per the documentation in WebContentsObserver, these two methods are invoked |
| 102 // when a Pepper plugin instance is attached/detached in the page DOM. | 102 // when a Pepper plugin instance is attached/detached in the page DOM. |
| 103 void PepperInstanceCreated() override; | 103 void PepperInstanceCreated(int32_t pp_instance) override; |
| 104 void PepperInstanceDeleted() override; | 104 void PepperInstanceDeleted(int32_t pp_instance) override; |
| 105 | 105 |
| 106 // Returns the extension id associated with the given |render_frame_host|, or | 106 // Returns the extension id associated with the given |render_frame_host|, or |
| 107 // the empty string if there is none. | 107 // the empty string if there is none. |
| 108 std::string GetExtensionIdFromFrame( | 108 std::string GetExtensionIdFromFrame( |
| 109 content::RenderFrameHost* render_frame_host) const; | 109 content::RenderFrameHost* render_frame_host) const; |
| 110 | 110 |
| 111 // TODO(devlin): Remove these once callers are updated to use the FromFrame | 111 // TODO(devlin): Remove these once callers are updated to use the FromFrame |
| 112 // equivalents. | 112 // equivalents. |
| 113 // Returns the extension or app associated with a render view host. Returns | 113 // Returns the extension or app associated with a render view host. Returns |
| 114 // NULL if the render view host is not for a valid extension. | 114 // NULL if the render view host is not for a valid extension. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 129 content::BrowserContext* browser_context_; | 129 content::BrowserContext* browser_context_; |
| 130 | 130 |
| 131 ExtensionFunctionDispatcher dispatcher_; | 131 ExtensionFunctionDispatcher dispatcher_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver); | 133 DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace extensions | 136 } // namespace extensions |
| 137 | 137 |
| 138 #endif // EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ | 138 #endif // EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |