Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: content/renderer/npapi/webplugin_impl.cc

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/npapi/webplugin_impl.h" 5 #include "content/renderer/npapi/webplugin_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 // Lie to ourselves about being windowless even if we got a fake 572 // Lie to ourselves about being windowless even if we got a fake
573 // plugin window handle, so we continue to get input events. 573 // plugin window handle, so we continue to get input events.
574 windowless_ = true; 574 windowless_ = true;
575 accepts_input_events_ = true; 575 accepts_input_events_ = true;
576 // We do not really need to notify the page delegate that a plugin 576 // We do not really need to notify the page delegate that a plugin
577 // window was created -- so don't. 577 // window was created -- so don't.
578 #else 578 #else
579 accepts_input_events_ = false; 579 accepts_input_events_ = false;
580 580
581 #if defined(USE_X11)
582 // Tell the view delegate that the plugin window was created, so that it
583 // can create necessary container widgets.
584 render_frame_->Send(new ViewHostMsg_CreatePluginContainer(
585 render_frame_->GetRenderWidget()->routing_id(), window));
586 #endif // USE_X11
587
588 #endif // OS_MACOSX 581 #endif // OS_MACOSX
589 } else { 582 } else {
590 DCHECK(!window_); // Make sure not called twice. 583 DCHECK(!window_); // Make sure not called twice.
591 windowless_ = true; 584 windowless_ = true;
592 accepts_input_events_ = true; 585 accepts_input_events_ = true;
593 } 586 }
594 } 587 }
595 588
596 void WebPluginImpl::SetAcceptsInputEvents(bool accepts) { 589 void WebPluginImpl::SetAcceptsInputEvents(bool accepts) {
597 accepts_input_events_ = accepts; 590 accepts_input_events_ = accepts;
598 } 591 }
599 592
600 void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) { 593 void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) {
601 DCHECK_EQ(window, window_); 594 DCHECK_EQ(window, window_);
602 window_ = gfx::kNullPluginWindow; 595 window_ = gfx::kNullPluginWindow;
603 if (render_view_.get()) { 596 if (render_view_.get())
604 #if defined(USE_X11)
605 render_frame_->Send(new ViewHostMsg_DestroyPluginContainer(
606 render_frame_->GetRenderWidget()->routing_id(), window));
607 #endif
608 render_frame_->GetRenderWidget()->CleanupWindowInPluginMoves(window); 597 render_frame_->GetRenderWidget()->CleanupWindowInPluginMoves(window);
609 }
610 } 598 }
611 599
612 GURL WebPluginImpl::CompleteURL(const char* url) { 600 GURL WebPluginImpl::CompleteURL(const char* url) {
613 if (!webframe_) { 601 if (!webframe_) {
614 NOTREACHED(); 602 NOTREACHED();
615 return GURL(); 603 return GURL();
616 } 604 }
617 // TODO(darin): Is conversion from UTF8 correct here? 605 // TODO(darin): Is conversion from UTF8 correct here?
618 return webframe_->document().completeURL(WebString::fromUTF8(url)); 606 return webframe_->document().completeURL(WebString::fromUTF8(url));
619 } 607 }
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 case PLUGIN_SRC: 1523 case PLUGIN_SRC:
1536 webframe_->setReferrerForRequest(*request, plugin_url_); 1524 webframe_->setReferrerForRequest(*request, plugin_url_);
1537 break; 1525 break;
1538 1526
1539 default: 1527 default:
1540 break; 1528 break;
1541 } 1529 }
1542 } 1530 }
1543 1531
1544 } // namespace content 1532 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_delegate_proxy.cc ('k') | content/renderer/pepper/ppb_image_data_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698