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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10578043: Hook up content/renderer to the PPAPI host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 8 years, 5 months 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 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 module_(module), 316 module_(module),
317 instance_interface_(instance_interface), 317 instance_interface_(instance_interface),
318 pp_instance_(0), 318 pp_instance_(0),
319 container_(NULL), 319 container_(NULL),
320 full_frame_(false), 320 full_frame_(false),
321 sent_initial_did_change_view_(false), 321 sent_initial_did_change_view_(false),
322 view_change_weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 322 view_change_weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
323 has_webkit_focus_(false), 323 has_webkit_focus_(false),
324 has_content_area_focus_(false), 324 has_content_area_focus_(false),
325 find_identifier_(-1), 325 find_identifier_(-1),
326 resource_creation_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
327 plugin_find_interface_(NULL), 326 plugin_find_interface_(NULL),
328 plugin_input_event_interface_(NULL), 327 plugin_input_event_interface_(NULL),
329 plugin_messaging_interface_(NULL), 328 plugin_messaging_interface_(NULL),
330 plugin_mouse_lock_interface_(NULL), 329 plugin_mouse_lock_interface_(NULL),
331 plugin_pdf_interface_(NULL), 330 plugin_pdf_interface_(NULL),
332 plugin_private_interface_(NULL), 331 plugin_private_interface_(NULL),
333 plugin_selection_interface_(NULL), 332 plugin_selection_interface_(NULL),
334 plugin_textinput_interface_(NULL), 333 plugin_textinput_interface_(NULL),
335 plugin_zoom_interface_(NULL), 334 plugin_zoom_interface_(NULL),
336 checked_for_plugin_input_event_interface_(false), 335 checked_for_plugin_input_event_interface_(false),
(...skipping 18 matching lines...) Expand all
355 flash_impl_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 354 flash_impl_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
356 pp_instance_ = HostGlobals::Get()->AddInstance(this); 355 pp_instance_ = HostGlobals::Get()->AddInstance(this);
357 356
358 memset(&current_print_settings_, 0, sizeof(current_print_settings_)); 357 memset(&current_print_settings_, 0, sizeof(current_print_settings_));
359 DCHECK(delegate); 358 DCHECK(delegate);
360 module_->InstanceCreated(this); 359 module_->InstanceCreated(this);
361 delegate_->InstanceCreated(this); 360 delegate_->InstanceCreated(this);
362 message_channel_.reset(new MessageChannel(this)); 361 message_channel_.reset(new MessageChannel(this));
363 362
364 view_data_.is_page_visible = delegate->IsPageVisible(); 363 view_data_.is_page_visible = delegate->IsPageVisible();
364
365 resource_creation_ = delegate_->CreateResourceCreationAPI(this);
365 } 366 }
366 367
367 PluginInstance::~PluginInstance() { 368 PluginInstance::~PluginInstance() {
368 DCHECK(!fullscreen_container_); 369 DCHECK(!fullscreen_container_);
369 370
370 // Free all the plugin objects. This will automatically clear the back- 371 // Free all the plugin objects. This will automatically clear the back-
371 // pointer from the NPObject so WebKit can't call into the plugin any more. 372 // pointer from the NPObject so WebKit can't call into the plugin any more.
372 // 373 //
373 // Swap out the set so we can delete from it (the objects will try to 374 // Swap out the set so we can delete from it (the objects will try to
374 // unregister themselves inside the delete call). 375 // unregister themselves inside the delete call).
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 screen_size_for_fullscreen_ = gfx::Size(); 2214 screen_size_for_fullscreen_ = gfx::Size();
2214 WebElement element = container_->element(); 2215 WebElement element = container_->element();
2215 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2216 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2216 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2217 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2217 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2218 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2218 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2219 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2219 } 2220 }
2220 2221
2221 } // namespace ppapi 2222 } // namespace ppapi
2222 } // namespace webkit 2223 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/resource_creation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698