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 "content/renderer/webplugin_delegate_proxy.h" | 5 #include "content/renderer/webplugin_delegate_proxy.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #elif defined(USE_X11) | 9 #elif defined(USE_X11) |
10 #include <cairo/cairo.h> | 10 #include <cairo/cairo.h> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 using WebKit::WebCursorInfo; | 69 using WebKit::WebCursorInfo; |
70 using WebKit::WebDragData; | 70 using WebKit::WebDragData; |
71 using WebKit::WebInputEvent; | 71 using WebKit::WebInputEvent; |
72 using WebKit::WebString; | 72 using WebKit::WebString; |
73 using WebKit::WebView; | 73 using WebKit::WebView; |
74 | 74 |
75 namespace { | 75 namespace { |
76 | 76 |
77 class ScopedLogLevel { | 77 class ScopedLogLevel { |
78 public: | 78 public: |
79 ScopedLogLevel(int level); | 79 explicit ScopedLogLevel(int level); |
80 ~ScopedLogLevel(); | 80 ~ScopedLogLevel(); |
81 | 81 |
82 private: | 82 private: |
83 int old_level_; | 83 int old_level_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(ScopedLogLevel); | 85 DISALLOW_COPY_AND_ASSIGN(ScopedLogLevel); |
86 }; | 86 }; |
87 | 87 |
88 ScopedLogLevel::ScopedLogLevel(int level) | 88 ScopedLogLevel::ScopedLogLevel(int level) |
89 : old_level_(logging::GetMinLogLevel()) { | 89 : old_level_(logging::GetMinLogLevel()) { |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 | 375 |
376 // Now tell the PluginInstance in the plugin process to initialize. | 376 // Now tell the PluginInstance in the plugin process to initialize. |
377 PluginMsg_Init_Params params; | 377 PluginMsg_Init_Params params; |
378 params.containing_window = render_view_->host_window(); | 378 params.containing_window = render_view_->host_window(); |
379 params.url = url; | 379 params.url = url; |
380 params.page_url = page_url_; | 380 params.page_url = page_url_; |
381 params.arg_names = arg_names; | 381 params.arg_names = arg_names; |
382 params.arg_values = arg_values; | 382 params.arg_values = arg_values; |
383 params.host_render_view_routing_id = render_view_->routing_id(); | 383 params.host_render_view_routing_id = render_view_->routing_id(); |
384 | 384 |
385 bool flash = | 385 bool flash = LowerCaseEqualsASCII(mime_type_, kFlashPluginSwfMimeType); |
386 LowerCaseEqualsASCII(mime_type_, "application/x-shockwave-flash"); | |
387 bool silverlight = | 386 bool silverlight = |
388 StartsWithASCII(mime_type_, "application/x-silverlight", false); | 387 StartsWithASCII(mime_type_, "application/x-silverlight", false); |
389 for (size_t i = 0; i < arg_names.size(); ++i) { | 388 for (size_t i = 0; i < arg_names.size(); ++i) { |
390 if ((flash && LowerCaseEqualsASCII(arg_names[i], "wmode") && | 389 if ((flash && LowerCaseEqualsASCII(arg_names[i], "wmode") && |
391 LowerCaseEqualsASCII(arg_values[i], "transparent")) || | 390 LowerCaseEqualsASCII(arg_values[i], "transparent")) || |
392 (silverlight && LowerCaseEqualsASCII(arg_names[i], "background") && | 391 (silverlight && LowerCaseEqualsASCII(arg_names[i], "background") && |
393 SilverlightColorIsTransparent(arg_values[i]))) { | 392 SilverlightColorIsTransparent(arg_values[i]))) { |
394 transparent_ = true; | 393 transparent_ = true; |
395 } | 394 } |
396 } | 395 } |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 } | 1525 } |
1527 #endif | 1526 #endif |
1528 | 1527 |
1529 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1528 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
1530 int resource_id) { | 1529 int resource_id) { |
1531 if (!plugin_) | 1530 if (!plugin_) |
1532 return; | 1531 return; |
1533 | 1532 |
1534 plugin_->URLRedirectResponse(allow, resource_id); | 1533 plugin_->URLRedirectResponse(allow, resource_id); |
1535 } | 1534 } |
OLD | NEW |