| 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/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1936 } | 1936 } |
| 1937 | 1937 |
| 1938 PP_Bool PluginInstance::IsFullFrame(PP_Instance instance) { | 1938 PP_Bool PluginInstance::IsFullFrame(PP_Instance instance) { |
| 1939 return PP_FromBool(full_frame()); | 1939 return PP_FromBool(full_frame()); |
| 1940 } | 1940 } |
| 1941 | 1941 |
| 1942 const ViewData* PluginInstance::GetViewData(PP_Instance instance) { | 1942 const ViewData* PluginInstance::GetViewData(PP_Instance instance) { |
| 1943 return &view_data_; | 1943 return &view_data_; |
| 1944 } | 1944 } |
| 1945 | 1945 |
| 1946 PP_Bool PluginInstance::FlashIsFullscreen(PP_Instance instance) { |
| 1947 return PP_FromBool(flash_fullscreen_); |
| 1948 } |
| 1949 |
| 1946 PP_Var PluginInstance::GetWindowObject(PP_Instance instance) { | 1950 PP_Var PluginInstance::GetWindowObject(PP_Instance instance) { |
| 1947 if (!container_) | 1951 if (!container_) |
| 1948 return PP_MakeUndefined(); | 1952 return PP_MakeUndefined(); |
| 1949 | 1953 |
| 1950 WebFrame* frame = container_->element().document().frame(); | 1954 WebFrame* frame = container_->element().document().frame(); |
| 1951 if (!frame) | 1955 if (!frame) |
| 1952 return PP_MakeUndefined(); | 1956 return PP_MakeUndefined(); |
| 1953 | 1957 |
| 1954 return NPObjectToPPVar(this, frame->windowObject()); | 1958 return NPObjectToPPVar(this, frame->windowObject()); |
| 1955 } | 1959 } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2137 return &flash_impl_; | 2141 return &flash_impl_; |
| 2138 } | 2142 } |
| 2139 | 2143 |
| 2140 ::ppapi::Resource* PluginInstance::GetSingletonResource( | 2144 ::ppapi::Resource* PluginInstance::GetSingletonResource( |
| 2141 PP_Instance instance, | 2145 PP_Instance instance, |
| 2142 ::ppapi::SingletonResourceID id) { | 2146 ::ppapi::SingletonResourceID id) { |
| 2143 // Flash APIs aren't implemented in-process. | 2147 // Flash APIs aren't implemented in-process. |
| 2144 switch (id) { | 2148 switch (id) { |
| 2145 case ::ppapi::FLASH_SINGLETON_ID: | 2149 case ::ppapi::FLASH_SINGLETON_ID: |
| 2146 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID: | 2150 case ::ppapi::FLASH_CLIPBOARD_SINGLETON_ID: |
| 2151 case ::ppapi::FLASH_FULLSCREEN_SINGLETON_ID: |
| 2147 NOTIMPLEMENTED(); | 2152 NOTIMPLEMENTED(); |
| 2148 return NULL; | 2153 return NULL; |
| 2149 case ::ppapi::GAMEPAD_SINGLETON_ID: | 2154 case ::ppapi::GAMEPAD_SINGLETON_ID: |
| 2150 return gamepad_impl_; | 2155 return gamepad_impl_; |
| 2151 } | 2156 } |
| 2152 | 2157 |
| 2153 NOTREACHED(); | 2158 NOTREACHED(); |
| 2154 return NULL; | 2159 return NULL; |
| 2155 } | 2160 } |
| 2156 | 2161 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2487 screen_size_for_fullscreen_ = gfx::Size(); | 2492 screen_size_for_fullscreen_ = gfx::Size(); |
| 2488 WebElement element = container_->element(); | 2493 WebElement element = container_->element(); |
| 2489 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2494 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2490 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2495 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2491 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2496 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2492 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2497 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2493 } | 2498 } |
| 2494 | 2499 |
| 2495 } // namespace ppapi | 2500 } // namespace ppapi |
| 2496 } // namespace webkit | 2501 } // namespace webkit |
| OLD | NEW |