| 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 #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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 WebFrame* frame = container_->element().document().frame(); | 1710 WebFrame* frame = container_->element().document().frame(); |
| 1711 if (!frame) { | 1711 if (!frame) { |
| 1712 try_catch.SetException("No frame to execute script in."); | 1712 try_catch.SetException("No frame to execute script in."); |
| 1713 return PP_MakeUndefined(); | 1713 return PP_MakeUndefined(); |
| 1714 } | 1714 } |
| 1715 | 1715 |
| 1716 NPVariant result; | 1716 NPVariant result; |
| 1717 bool ok = WebBindings::evaluate(NULL, frame->windowObject(), &np_script, | 1717 bool ok = WebBindings::evaluate(NULL, frame->windowObject(), &np_script, |
| 1718 &result); | 1718 &result); |
| 1719 if (!ok) { | 1719 if (!ok) { |
| 1720 // TODO(brettw) bug 54011: The TryCatch isn't working properly and | 1720 // TryCatch doesn't catch the exceptions properly. Since this is only for |
| 1721 // doesn't actually catch this exception. | 1721 // a trusted API, just set to a general exception message. |
| 1722 try_catch.SetException("Exception caught"); | 1722 try_catch.SetException("Exception caught"); |
| 1723 WebBindings::releaseVariantValue(&result); | 1723 WebBindings::releaseVariantValue(&result); |
| 1724 return PP_MakeUndefined(); | 1724 return PP_MakeUndefined(); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 PP_Var ret = NPVariantToPPVar(this, &result); | 1727 PP_Var ret = NPVariantToPPVar(this, &result); |
| 1728 WebBindings::releaseVariantValue(&result); | 1728 WebBindings::releaseVariantValue(&result); |
| 1729 return ret; | 1729 return ret; |
| 1730 } | 1730 } |
| 1731 | 1731 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2013 screen_size_for_fullscreen_ = gfx::Size(); | 2013 screen_size_for_fullscreen_ = gfx::Size(); |
| 2014 WebElement element = container_->element(); | 2014 WebElement element = container_->element(); |
| 2015 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2015 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2016 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2016 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2017 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2017 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2018 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2018 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2019 } | 2019 } |
| 2020 | 2020 |
| 2021 } // namespace ppapi | 2021 } // namespace ppapi |
| 2022 } // namespace webkit | 2022 } // namespace webkit |
| OLD | NEW |