OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/npapi/webplugin_impl.h" | 5 #include "webkit/plugins/npapi/webplugin_impl.h" |
6 | 6 |
7 #include "base/linked_ptr.h" | 7 #include "base/linked_ptr.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 | 773 |
774 WebCookieJar* cookie_jar = page_delegate_->GetCookieJar(); | 774 WebCookieJar* cookie_jar = page_delegate_->GetCookieJar(); |
775 if (!cookie_jar) { | 775 if (!cookie_jar) { |
776 DLOG(WARNING) << "No cookie jar!"; | 776 DLOG(WARNING) << "No cookie jar!"; |
777 return std::string(); | 777 return std::string(); |
778 } | 778 } |
779 | 779 |
780 return UTF16ToUTF8(cookie_jar->cookies(url, first_party_for_cookies)); | 780 return UTF16ToUTF8(cookie_jar->cookies(url, first_party_for_cookies)); |
781 } | 781 } |
782 | 782 |
783 void WebPluginImpl::ShowModalHTMLDialog(const GURL& url, int width, int height, | |
784 const std::string& json_arguments, | |
785 std::string* json_retval) { | |
786 if (page_delegate_) { | |
787 page_delegate_->ShowModalHTMLDialogForPlugin( | |
788 url, gfx::Size(width, height), json_arguments, json_retval); | |
789 } | |
790 } | |
791 | |
792 void WebPluginImpl::OnMissingPluginStatus(int status) { | 783 void WebPluginImpl::OnMissingPluginStatus(int status) { |
793 NOTREACHED(); | 784 NOTREACHED(); |
794 } | 785 } |
795 | 786 |
796 void WebPluginImpl::URLRedirectResponse(bool allow, int resource_id) { | 787 void WebPluginImpl::URLRedirectResponse(bool allow, int resource_id) { |
797 for (size_t i = 0; i < clients_.size(); ++i) { | 788 for (size_t i = 0; i < clients_.size(); ++i) { |
798 if (clients_[i].id == static_cast<unsigned long>(resource_id)) { | 789 if (clients_[i].id == static_cast<unsigned long>(resource_id)) { |
799 if (clients_[i].loader.get()) { | 790 if (clients_[i].loader.get()) { |
800 if (allow) { | 791 if (allow) { |
801 clients_[i].loader->setDefersLoading(false); | 792 clients_[i].loader->setDefersLoading(false); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 if (!webframe_) | 1378 if (!webframe_) |
1388 return NULL; | 1379 return NULL; |
1389 WebView* view = webframe_->view(); | 1380 WebView* view = webframe_->view(); |
1390 if (!view) | 1381 if (!view) |
1391 return NULL; | 1382 return NULL; |
1392 return view->devToolsAgent(); | 1383 return view->devToolsAgent(); |
1393 } | 1384 } |
1394 | 1385 |
1395 } // namespace npapi | 1386 } // namespace npapi |
1396 } // namespace webkit | 1387 } // namespace webkit |
OLD | NEW |