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

Side by Side Diff: third_party/WebKit/Source/core/exported/WebPluginContainerBase.h

Issue 2886113002: Introduce WebPluginContainerBase to abstract WebPluginContainerImpl. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.#ifndef WebViewBase_h
4
5 #ifndef WebPluginContainerBase_h
6 #define WebPluginContainerBase_h
7
8 #include "core/CoreExport.h"
9 #include "core/dom/ContextLifecycleObserver.h"
10 #include "core/plugins/PluginView.h"
11 #include "public/web/WebPluginContainer.h"
12
13 namespace blink {
14
15 class ResourceError;
16
17 struct WebPrintParams;
18 struct WebPrintPresetOptions;
19
20 // WebPluginContainerBase is a temporary class the provides a layer of
21 // abstraction for WebPluginContainerImpl. Mehtods that are declared public in
22 // WebPluginContainerImpl that are not overrides from PluginView,
23 // WebPuglinContainer or ContextClient will be declared pure virtual in
24 // WebPluginContainerBase. Classes that then have a dependency on
25 // WebPluginContainerImpl will then take a dependency on WebPluginContainerBase
26 // instead, so we can remove cyclic dependencies in web/ and move classes from
27 // web/ into core/ or modules.
28 // TODO(slangley): Remove this class once WebPluginContainerImpl is in core/.
29 class CORE_EXPORT WebPluginContainerBase
30 : public GarbageCollectedFinalized<WebPluginContainerBase>,
31 public PluginView,
32 NON_EXPORTED_BASE(public WebPluginContainer),
33 public ContextClient {
34 USING_GARBAGE_COLLECTED_MIXIN(WebPluginContainerBase);
35 USING_PRE_FINALIZER(WebPluginContainerBase, Dispose);
36
37 public:
38 virtual int PrintBegin(const WebPrintParams&) const = 0;
39 virtual void PrintPage(int page_number, GraphicsContext&, const IntRect&) = 0;
40 virtual void PrintEnd() = 0;
41 virtual bool ExecuteEditCommand(const WebString& name) = 0;
42 virtual bool ExecuteEditCommand(const WebString& name,
43 const WebString& value) = 0;
44 virtual bool SupportsPaginatedPrint() const = 0;
45 virtual bool IsPrintScalingDisabled() const = 0;
46 virtual bool GetPrintPresetOptionsFromDocument(
47 WebPrintPresetOptions*) const = 0;
48 virtual void DidFinishLoading() = 0;
49 virtual void DidFailLoading(const ResourceError&) = 0;
50 virtual void CalculateGeometry(IntRect& window_rect,
51 IntRect& clip_rect,
52 IntRect& unobscured_rect) = 0;
53
54 DECLARE_VIRTUAL_TRACE();
55 void Dispose() override{};
56
57 protected:
58 explicit WebPluginContainerBase(LocalFrame*);
59 };
60
61 DEFINE_TYPE_CASTS(WebPluginContainerBase,
62 PluginView,
63 plugin,
64 plugin->IsPluginContainer(),
65 plugin.IsPluginContainer());
66 // Unlike FrameViewBase, we need not worry about object type for container.
67 // WebPluginContainerBase is the only subclass of WebPluginContainer.
68 DEFINE_TYPE_CASTS(WebPluginContainerBase,
69 WebPluginContainer,
70 container,
71 true,
72 true);
dcheng 2017/05/17 07:19:41 Optional nit: newline for consistency =P
slangley 2017/05/17 07:21:37 Done
73 } // nammespace blink
74
75 #endif // WebPluginContainerBase_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/exported/BUILD.gn ('k') | third_party/WebKit/Source/core/exported/WebPluginContainerBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698