| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Plugins need to explicitly opt out the text input mode if they know | 153 // Plugins need to explicitly opt out the text input mode if they know |
| 154 // that they don't accept texts. | 154 // that they don't accept texts. |
| 155 const ui::TextInputType kPluginDefaultTextInputType = ui::TEXT_INPUT_TYPE_TEXT; | 155 const ui::TextInputType kPluginDefaultTextInputType = ui::TEXT_INPUT_TYPE_TEXT; |
| 156 | 156 |
| 157 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, np_name) \ | 157 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, np_name) \ |
| 158 COMPILE_ASSERT(static_cast<int>(WebCursorInfo::webkit_name) \ | 158 COMPILE_ASSERT(static_cast<int>(WebCursorInfo::webkit_name) \ |
| 159 == static_cast<int>(np_name), \ | 159 == static_cast<int>(np_name), \ |
| 160 mismatching_enums) | 160 mismatching_enums) |
| 161 | 161 |
| 162 // <embed>/<object> attributes. | 162 // <embed>/<object> attributes. |
| 163 static const char kWidth[] = "width"; | 163 const char kWidth[] = "width"; |
| 164 static const char kHeight[] = "height"; | 164 const char kHeight[] = "height"; |
| 165 static const char kBorder[] = "border"; // According to w3c, deprecated. | 165 const char kBorder[] = "border"; // According to w3c, deprecated. |
| 166 static const char kStyle[] = "style"; | 166 const char kStyle[] = "style"; |
| 167 | 167 |
| 168 COMPILE_ASSERT_MATCHING_ENUM(TypePointer, PP_CURSORTYPE_POINTER); | 168 COMPILE_ASSERT_MATCHING_ENUM(TypePointer, PP_CURSORTYPE_POINTER); |
| 169 COMPILE_ASSERT_MATCHING_ENUM(TypeCross, PP_CURSORTYPE_CROSS); | 169 COMPILE_ASSERT_MATCHING_ENUM(TypeCross, PP_CURSORTYPE_CROSS); |
| 170 COMPILE_ASSERT_MATCHING_ENUM(TypeHand, PP_CURSORTYPE_HAND); | 170 COMPILE_ASSERT_MATCHING_ENUM(TypeHand, PP_CURSORTYPE_HAND); |
| 171 COMPILE_ASSERT_MATCHING_ENUM(TypeIBeam, PP_CURSORTYPE_IBEAM); | 171 COMPILE_ASSERT_MATCHING_ENUM(TypeIBeam, PP_CURSORTYPE_IBEAM); |
| 172 COMPILE_ASSERT_MATCHING_ENUM(TypeWait, PP_CURSORTYPE_WAIT); | 172 COMPILE_ASSERT_MATCHING_ENUM(TypeWait, PP_CURSORTYPE_WAIT); |
| 173 COMPILE_ASSERT_MATCHING_ENUM(TypeHelp, PP_CURSORTYPE_HELP); | 173 COMPILE_ASSERT_MATCHING_ENUM(TypeHelp, PP_CURSORTYPE_HELP); |
| 174 COMPILE_ASSERT_MATCHING_ENUM(TypeEastResize, PP_CURSORTYPE_EASTRESIZE); | 174 COMPILE_ASSERT_MATCHING_ENUM(TypeEastResize, PP_CURSORTYPE_EASTRESIZE); |
| 175 COMPILE_ASSERT_MATCHING_ENUM(TypeNorthResize, PP_CURSORTYPE_NORTHRESIZE); | 175 COMPILE_ASSERT_MATCHING_ENUM(TypeNorthResize, PP_CURSORTYPE_NORTHRESIZE); |
| 176 COMPILE_ASSERT_MATCHING_ENUM(TypeNorthEastResize, | 176 COMPILE_ASSERT_MATCHING_ENUM(TypeNorthEastResize, |
| (...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2111 screen_size_for_fullscreen_ = gfx::Size(); | 2111 screen_size_for_fullscreen_ = gfx::Size(); |
| 2112 WebElement element = container_->element(); | 2112 WebElement element = container_->element(); |
| 2113 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2113 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2114 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2114 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2115 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2115 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2116 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2116 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2117 } | 2117 } |
| 2118 | 2118 |
| 2119 } // namespace ppapi | 2119 } // namespace ppapi |
| 2120 } // namespace webkit | 2120 } // namespace webkit |
| OLD | NEW |