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

Side by Side Diff: third_party/WebKit/Source/web/WebPluginDocument.cpp

Issue 2759063002: Remove most of Widget (FrameViewBase) class from HTMLPlugInElement. (Closed)
Patch Set: Fix shouldAccelerate Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 37
38 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 WebPlugin* WebPluginDocument::plugin() { 42 WebPlugin* WebPluginDocument::plugin() {
43 if (!isPluginDocument()) 43 if (!isPluginDocument())
44 return 0; 44 return 0;
45 PluginDocument* doc = unwrap<PluginDocument>(); 45 PluginDocument* doc = unwrap<PluginDocument>();
46 WebPluginContainerImpl* container = 46 WebPluginContainerImpl* container =
47 toWebPluginContainerImpl(doc->pluginWidget()); 47 toWebPluginContainerImpl(doc->pluginView());
48 return container ? container->plugin() : 0; 48 return container ? container->plugin() : 0;
49 } 49 }
50 50
51 WebPluginDocument::WebPluginDocument(PluginDocument* elem) 51 WebPluginDocument::WebPluginDocument(PluginDocument* elem)
52 : WebDocument(elem) {} 52 : WebDocument(elem) {}
53 53
54 DEFINE_WEB_NODE_TYPE_CASTS(WebPluginDocument, 54 DEFINE_WEB_NODE_TYPE_CASTS(WebPluginDocument,
55 isDocumentNode() && 55 isDocumentNode() &&
56 constUnwrap<Document>()->isPluginDocument()); 56 constUnwrap<Document>()->isPluginDocument());
57 57
58 WebPluginDocument& WebPluginDocument::operator=(PluginDocument* elem) { 58 WebPluginDocument& WebPluginDocument::operator=(PluginDocument* elem) {
59 m_private = elem; 59 m_private = elem;
60 return *this; 60 return *this;
61 } 61 }
62 62
63 WebPluginDocument::operator PluginDocument*() const { 63 WebPluginDocument::operator PluginDocument*() const {
64 return static_cast<PluginDocument*>(m_private.get()); 64 return static_cast<PluginDocument*>(m_private.get());
65 } 65 }
66 66
67 } // namespace blink 67 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698