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_RENDERER_EXTENSION_HELPER_H_ | 5 #ifndef EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ |
6 #define EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ | 6 #define EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/public/renderer/render_view_observer.h" | 11 #include "content/public/renderer/render_view_observer.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 class Dispatcher; | 14 class Dispatcher; |
15 | 15 |
16 // RenderView-level plumbing for extension features. | 16 // RenderView-level plumbing for extension features. |
17 class ExtensionHelper : public content::RenderViewObserver { | 17 class ExtensionHelper : public content::RenderViewObserver { |
18 public: | 18 public: |
19 ExtensionHelper(content::RenderView* render_view, Dispatcher* dispatcher); | 19 ExtensionHelper(content::RenderView* render_view, Dispatcher* dispatcher); |
20 ~ExtensionHelper() override; | 20 ~ExtensionHelper() override; |
21 | 21 |
22 private: | 22 private: |
23 // RenderViewObserver implementation. | 23 // RenderViewObserver implementation. |
24 bool OnMessageReceived(const IPC::Message& message) override; | 24 bool OnMessageReceived(const IPC::Message& message) override; |
25 void DraggableRegionsChanged(blink::WebFrame* frame) override; | 25 void DraggableRegionsChanged(blink::WebFrame* frame) override; |
| 26 void OnDestruct() override; |
26 | 27 |
27 void OnAppWindowClosed(); | 28 void OnAppWindowClosed(); |
28 void OnSetFrameName(const std::string& name); | 29 void OnSetFrameName(const std::string& name); |
29 | 30 |
30 Dispatcher* dispatcher_; | 31 Dispatcher* dispatcher_; |
31 | 32 |
32 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); | 33 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); |
33 }; | 34 }; |
34 | 35 |
35 } // namespace extensions | 36 } // namespace extensions |
36 | 37 |
37 #endif // EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ | 38 #endif // EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ |
OLD | NEW |