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

Side by Side Diff: Source/core/html/HTMLPlugInElement.h

Issue 34623002: Move the follwing members from HTMLPlugInImageElement to HTMLPlugInElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | Source/core/html/HTMLPlugInElement.cpp » ('j') | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserv ed.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 16 matching lines...) Expand all
27 #include "core/html/HTMLFrameOwnerElement.h" 27 #include "core/html/HTMLFrameOwnerElement.h"
28 28
29 struct NPObject; 29 struct NPObject;
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 class RenderEmbeddedObject; 33 class RenderEmbeddedObject;
34 class RenderWidget; 34 class RenderWidget;
35 class Widget; 35 class Widget;
36 36
37 enum PreferPlugInsForImagesOption {
38 ShouldPreferPlugInsForImages,
39 ShouldNotPreferPlugInsForImages
40 };
41
37 class HTMLPlugInElement : public HTMLFrameOwnerElement { 42 class HTMLPlugInElement : public HTMLFrameOwnerElement {
38 public: 43 public:
39 virtual ~HTMLPlugInElement(); 44 virtual ~HTMLPlugInElement();
40 45
41 void resetInstance(); 46 void resetInstance();
42 47
43 SharedPersistent<v8::Object>* pluginWrapper(); 48 SharedPersistent<v8::Object>* pluginWrapper();
44 49
45 Widget* pluginWidget() const; 50 Widget* pluginWidget() const;
46 51
(...skipping 14 matching lines...) Expand all
61 66
62 bool canProcessDrag() const; 67 bool canProcessDrag() const;
63 68
64 virtual bool willRespondToMouseClickEvents() OVERRIDE; 69 virtual bool willRespondToMouseClickEvents() OVERRIDE;
65 70
66 virtual bool isPlugInImageElement() const { return false; } 71 virtual bool isPlugInImageElement() const { return false; }
67 72
68 virtual void removeAllEventListeners() OVERRIDE FINAL; 73 virtual void removeAllEventListeners() OVERRIDE FINAL;
69 74
70 protected: 75 protected:
71 HTMLPlugInElement(const QualifiedName& tagName, Document&); 76 HTMLPlugInElement(const QualifiedName& tagName, Document&, PreferPlugInsForI magesOption);
72 77
73 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; 78 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
74 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 79 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
75 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; 80 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
76 81
77 virtual bool useFallbackContent() const { return false; } 82 virtual bool useFallbackContent() const { return false; }
78 83
79 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; 84 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE;
80 85
81 // Create or update the RenderWidget and return it, triggering layout if nec essary. 86 // Create or update the RenderWidget and return it, triggering layout if nec essary.
82 virtual RenderWidget* renderWidgetForJSBindings() const; 87 virtual RenderWidget* renderWidgetForJSBindings() const;
83 88
89 bool isImageType();
90 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI mages; }
91
92 String m_serviceType;
93 String m_url;
94
84 private: 95 private:
85 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } 96 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
86 97
87 virtual void defaultEventHandler(Event*); 98 virtual void defaultEventHandler(Event*);
88 99
89 // Return any existing RenderWidget without triggering relayout, or 0 if it doesn't yet exist. 100 // Return any existing RenderWidget without triggering relayout, or 0 if it doesn't yet exist.
90 virtual RenderWidget* existingRenderWidget() const = 0; 101 virtual RenderWidget* existingRenderWidget() const = 0;
91 102
92 virtual bool supportsFocus() const OVERRIDE { return true; }; 103 virtual bool supportsFocus() const OVERRIDE { return true; };
93 virtual bool rendererIsFocusable() const OVERRIDE; 104 virtual bool rendererIsFocusable() const OVERRIDE;
94 105
95 virtual bool isKeyboardFocusable() const OVERRIDE; 106 virtual bool isKeyboardFocusable() const OVERRIDE;
96 virtual bool isPluginElement() const; 107 virtual bool isPluginElement() const;
97 108
98 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; 109 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper;
99 NPObject* m_NPObject; 110 NPObject* m_NPObject;
100 bool m_isCapturingMouseEvents; 111 bool m_isCapturingMouseEvents;
101 bool m_inBeforeLoadEventHandler; 112 bool m_inBeforeLoadEventHandler;
113 bool m_shouldPreferPlugInsForImages;
102 DisplayState m_displayState; 114 DisplayState m_displayState;
103 }; 115 };
104 116
105 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); 117 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement());
106 118
107 } // namespace WebCore 119 } // namespace WebCore
108 120
109 #endif // HTMLPlugInElement_h 121 #endif // HTMLPlugInElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698