OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_PLUGIN_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_PLUGIN_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "remoting/client/pepper/pepper_plugin.h" |
| 11 |
| 12 namespace remoting { |
| 13 |
| 14 static const char kMimeType[] |
| 15 = "pepper-application/x-chromoting-plugin::Chromoting"; |
| 16 |
| 17 class ChromotingClient; |
| 18 |
| 19 class ChromotingPlugin : public pepper::PepperPlugin { |
| 20 public: |
| 21 ChromotingPlugin(NPNetscapeFuncs* browser_funcs, NPP instance); |
| 22 virtual ~ChromotingPlugin(); |
| 23 |
| 24 int width() { return width_; } |
| 25 int height() { return height_; } |
| 26 NPDevice* device() { return device_; } |
| 27 |
| 28 NPError New(NPMIMEType pluginType, int16 argc, char* argn[], char* argv[]); |
| 29 NPError Destroy(NPSavedData** save); |
| 30 NPError SetWindow(NPWindow* window); |
| 31 int16 HandleEvent(void* event); |
| 32 NPError GetValue(NPPVariable variable, void* value); |
| 33 NPError SetValue(NPNVariable variable, void* value); |
| 34 |
| 35 // Set up drawing context and update display. |
| 36 void draw(); |
| 37 |
| 38 private: |
| 39 // Size of the plugin window. |
| 40 int width_, height_; |
| 41 |
| 42 // Rendering device provided by browser. |
| 43 NPDevice* device_; |
| 44 |
| 45 // Chromoting client manager. |
| 46 ChromotingClient* client_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(ChromotingPlugin); |
| 49 }; |
| 50 |
| 51 } // namespace remoting |
| 52 |
| 53 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_PLUGIN_H_ |
OLD | NEW |