| OLD | NEW |
| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 module_(module), | 315 module_(module), |
| 316 instance_interface_(instance_interface), | 316 instance_interface_(instance_interface), |
| 317 pp_instance_(0), | 317 pp_instance_(0), |
| 318 container_(NULL), | 318 container_(NULL), |
| 319 full_frame_(false), | 319 full_frame_(false), |
| 320 sent_initial_did_change_view_(false), | 320 sent_initial_did_change_view_(false), |
| 321 suppress_did_change_view_(false), | 321 suppress_did_change_view_(false), |
| 322 has_webkit_focus_(false), | 322 has_webkit_focus_(false), |
| 323 has_content_area_focus_(false), | 323 has_content_area_focus_(false), |
| 324 find_identifier_(-1), | 324 find_identifier_(-1), |
| 325 resource_creation_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | |
| 326 plugin_find_interface_(NULL), | 325 plugin_find_interface_(NULL), |
| 327 plugin_messaging_interface_(NULL), | 326 plugin_messaging_interface_(NULL), |
| 328 plugin_mouse_lock_interface_(NULL), | 327 plugin_mouse_lock_interface_(NULL), |
| 329 plugin_input_event_interface_(NULL), | 328 plugin_input_event_interface_(NULL), |
| 330 plugin_private_interface_(NULL), | 329 plugin_private_interface_(NULL), |
| 331 plugin_pdf_interface_(NULL), | 330 plugin_pdf_interface_(NULL), |
| 332 plugin_selection_interface_(NULL), | 331 plugin_selection_interface_(NULL), |
| 333 plugin_textinput_interface_(NULL), | 332 plugin_textinput_interface_(NULL), |
| 334 plugin_zoom_interface_(NULL), | 333 plugin_zoom_interface_(NULL), |
| 335 checked_for_plugin_input_event_interface_(false), | 334 checked_for_plugin_input_event_interface_(false), |
| (...skipping 19 matching lines...) Expand all Loading... |
| 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(¤t_print_settings_, 0, sizeof(current_print_settings_)); | 357 memset(¤t_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 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2152 screen_size_for_fullscreen_ = gfx::Size(); | 2153 screen_size_for_fullscreen_ = gfx::Size(); |
| 2153 WebElement element = container_->element(); | 2154 WebElement element = container_->element(); |
| 2154 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2155 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2155 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2156 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2156 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2157 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2157 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2158 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2158 } | 2159 } |
| 2159 | 2160 |
| 2160 } // namespace ppapi | 2161 } // namespace ppapi |
| 2161 } // namespace webkit | 2162 } // namespace webkit |
| OLD | NEW |