Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1500)

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.h

Issue 11606005: Browser Plugin: Simplify BrowserPluginGuestHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
7 7
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 class BrowserPluginManager; 29 class BrowserPluginManager;
30 class MockBrowserPlugin; 30 class MockBrowserPlugin;
31 31
32 class CONTENT_EXPORT BrowserPlugin : 32 class CONTENT_EXPORT BrowserPlugin :
33 NON_EXPORTED_BASE(public WebKit::WebPlugin) { 33 NON_EXPORTED_BASE(public WebKit::WebPlugin) {
34 public: 34 public:
35 RenderViewImpl* render_view() const { return render_view_.get(); } 35 RenderViewImpl* render_view() const { return render_view_.get(); }
36 // Called only by tests to clean up before we blow away the MockRenderProcess. 36 // Called only by tests to clean up before we blow away the MockRenderProcess.
37 void Cleanup(); 37 void Cleanup();
38 38
39 virtual bool OnMessageReceived(const IPC::Message& msg); 39 bool OnMessageReceived(const IPC::Message& msg);
40 40
41 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value 41 // Update Browser Plugin's DOM Node attribute |attribute_name| with the value
42 // |attribute_value|. 42 // |attribute_value|.
43 void UpdateDOMAttribute(const std::string& attribute_name, 43 void UpdateDOMAttribute(const std::string& attribute_name,
44 const std::string& attribute_value); 44 const std::string& attribute_value);
45 45
46 // Get the src attribute value of the BrowserPlugin instance. 46 // Get the src attribute value of the BrowserPlugin instance.
47 std::string src_attribute() const { return src_; } 47 std::string src_attribute() const { return src_; }
48 // Set the src attribute value of the BrowserPlugin instance. 48 // Set the src attribute value of the BrowserPlugin instance.
49 bool SetSrcAttribute(const std::string& src, std::string* error_message); 49 bool SetSrcAttribute(const std::string& src, std::string* error_message);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 const BrowserPluginMsg_LoadCommit_Params& params); 257 const BrowserPluginMsg_LoadCommit_Params& params);
258 void OnLoadRedirect(int instance_id, 258 void OnLoadRedirect(int instance_id,
259 const GURL& old_url, 259 const GURL& old_url,
260 const GURL& new_url, 260 const GURL& new_url,
261 bool is_top_level); 261 bool is_top_level);
262 void OnLoadStart(int instance_id, const GURL& url, bool is_top_level); 262 void OnLoadStart(int instance_id, const GURL& url, bool is_top_level);
263 void OnLoadStop(int instance_id); 263 void OnLoadStop(int instance_id);
264 void OnSetCursor(int instance_id, const WebCursor& cursor); 264 void OnSetCursor(int instance_id, const WebCursor& cursor);
265 void OnShouldAcceptTouchEvents(int instance_id, bool accept); 265 void OnShouldAcceptTouchEvents(int instance_id, bool accept);
266 void OnUpdateRect(int instance_id, 266 void OnUpdateRect(int instance_id,
267 int message_id,
268 const BrowserPluginMsg_UpdateRect_Params& params); 267 const BrowserPluginMsg_UpdateRect_Params& params);
269 268
270 int instance_id_; 269 int instance_id_;
271 base::WeakPtr<RenderViewImpl> render_view_; 270 base::WeakPtr<RenderViewImpl> render_view_;
272 // We cache the |render_view_|'s routing ID because we need it on destruction. 271 // We cache the |render_view_|'s routing ID because we need it on destruction.
273 // If the |render_view_| is destroyed before the BrowserPlugin is destroyed 272 // If the |render_view_| is destroyed before the BrowserPlugin is destroyed
274 // then we will attempt to access a NULL pointer. 273 // then we will attempt to access a NULL pointer.
275 int render_view_routing_id_; 274 int render_view_routing_id_;
276 WebKit::WebPluginContainer* container_; 275 WebKit::WebPluginContainer* container_;
277 scoped_ptr<BrowserPluginBindings> bindings_; 276 scoped_ptr<BrowserPluginBindings> bindings_;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 327
329 // Used for HW compositing. 328 // Used for HW compositing.
330 bool compositing_enabled_; 329 bool compositing_enabled_;
331 330
332 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); 331 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin);
333 }; 332 };
334 333
335 } // namespace content 334 } // namespace content
336 335
337 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ 336 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_
OLDNEW
« no previous file with comments | « content/common/browser_plugin_messages.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698