| OLD | NEW | 
|   1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2011 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 CONTENT_COMMON_CONTENT_CLIENT_H_ |   5 #ifndef CONTENT_COMMON_CONTENT_CLIENT_H_ | 
|   6 #define CONTENT_COMMON_CONTENT_CLIENT_H_ |   6 #define CONTENT_COMMON_CONTENT_CLIENT_H_ | 
|   7 #pragma once |   7 #pragma once | 
|   8  |   8  | 
|   9 #include <vector> |   9 #include <vector> | 
|  10  |  10  | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
|  23 namespace sandbox { |  23 namespace sandbox { | 
|  24 class TargetPolicy; |  24 class TargetPolicy; | 
|  25 } |  25 } | 
|  26  |  26  | 
|  27 namespace content { |  27 namespace content { | 
|  28  |  28  | 
|  29 class ContentBrowserClient; |  29 class ContentBrowserClient; | 
|  30 class ContentClient; |  30 class ContentClient; | 
|  31 class ContentPluginClient; |  31 class ContentPluginClient; | 
|  32 class ContentRendererClient; |  32 class ContentRendererClient; | 
 |  33 class ContentUtilityClient; | 
|  33  |  34  | 
|  34 // Setter and getter for the client.  The client should be set early, before any |  35 // Setter and getter for the client.  The client should be set early, before any | 
|  35 // content code is called. |  36 // content code is called. | 
|  36 void SetContentClient(ContentClient* client); |  37 void SetContentClient(ContentClient* client); | 
|  37 ContentClient* GetContentClient(); |  38 ContentClient* GetContentClient(); | 
|  38  |  39  | 
|  39 // Interface that the embedder implements. |  40 // Interface that the embedder implements. | 
|  40 class ContentClient { |  41 class ContentClient { | 
|  41  public: |  42  public: | 
|  42   ContentClient(); |  43   ContentClient(); | 
|  43   ~ContentClient(); |  44   ~ContentClient(); | 
|  44  |  45  | 
|  45   ContentBrowserClient* browser() { return browser_; } |  46   ContentBrowserClient* browser() { return browser_; } | 
|  46   void set_browser(ContentBrowserClient* c) { browser_ = c; } |  47   void set_browser(ContentBrowserClient* c) { browser_ = c; } | 
|  47   ContentPluginClient* plugin() { return plugin_; } |  48   ContentPluginClient* plugin() { return plugin_; } | 
|  48   void set_plugin(ContentPluginClient* r) { plugin_ = r; } |  49   void set_plugin(ContentPluginClient* p) { plugin_ = p; } | 
|  49   ContentRendererClient* renderer() { return renderer_; } |  50   ContentRendererClient* renderer() { return renderer_; } | 
|  50   void set_renderer(ContentRendererClient* r) { renderer_ = r; } |  51   void set_renderer(ContentRendererClient* r) { renderer_ = r; } | 
 |  52   ContentUtilityClient* utility() { return utility_; } | 
 |  53   void set_utility(ContentUtilityClient* u) { utility_ = u; } | 
|  51  |  54  | 
|  52   // Sets the currently active URL.  Use GURL() to clear the URL. |  55   // Sets the currently active URL.  Use GURL() to clear the URL. | 
|  53   virtual void SetActiveURL(const GURL& url) {} |  56   virtual void SetActiveURL(const GURL& url) {} | 
|  54  |  57  | 
|  55   // Sets the data on the current gpu. |  58   // Sets the data on the current gpu. | 
|  56   virtual void SetGpuInfo(const GPUInfo& gpu_info) {} |  59   virtual void SetGpuInfo(const GPUInfo& gpu_info) {} | 
|  57  |  60  | 
|  58   // Gives the embedder a chance to register its own pepper plugins. |  61   // Gives the embedder a chance to register its own pepper plugins. | 
|  59   virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) {} |  62   virtual void AddPepperPlugins(std::vector<PepperPluginInfo>* plugins) {} | 
|  60  |  63  | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|  72                              sandbox::TargetPolicy* policy); |  75                              sandbox::TargetPolicy* policy); | 
|  73 #endif |  76 #endif | 
|  74  |  77  | 
|  75  private: |  78  private: | 
|  76   // The embedder API for participating in browser logic. |  79   // The embedder API for participating in browser logic. | 
|  77   ContentBrowserClient* browser_; |  80   ContentBrowserClient* browser_; | 
|  78   // The embedder API for participating in plugin logic. |  81   // The embedder API for participating in plugin logic. | 
|  79   ContentPluginClient* plugin_; |  82   ContentPluginClient* plugin_; | 
|  80   // The embedder API for participating in renderer logic. |  83   // The embedder API for participating in renderer logic. | 
|  81   ContentRendererClient* renderer_; |  84   ContentRendererClient* renderer_; | 
 |  85   // The embedder API for participating in utility logic. | 
 |  86   ContentUtilityClient* utility_; | 
|  82 }; |  87 }; | 
|  83  |  88  | 
|  84 }  // namespace content |  89 }  // namespace content | 
|  85  |  90  | 
|  86 #endif  // CONTENT_COMMON_CONTENT_CLIENT_H_ |  91 #endif  // CONTENT_COMMON_CONTENT_CLIENT_H_ | 
| OLD | NEW |