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