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

Side by Side Diff: third_party/WebKit/Source/core/frame/WebLocalFrameBase.h

Issue 2873213003: Move WebFrame to use WebLocalFrameBase instead of WebLocalFrameImpl. (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrame.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 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 3 // found in the LICENSE file.#ifndef WebViewBase_h
4 4
5 #ifndef WebLocalFrameBase_h 5 #ifndef WebLocalFrameBase_h
6 #define WebLocalFrameBase_h 6 #define WebLocalFrameBase_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "public/web/WebLocalFrame.h" 9 #include "public/web/WebLocalFrame.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class FrameOwner;
13 class FrameView; 14 class FrameView;
14 class LocalFrame; 15 class LocalFrame;
15 class Node; 16 class Node;
17 class Page;
16 class WebFrameClient; 18 class WebFrameClient;
17 class WebTextCheckClient; 19 class WebTextCheckClient;
18 class WebViewBase; 20 class WebViewBase;
19 21
20 // WebLocalFrameBase is a temporary class the provides a layer of abstraction 22 // WebLocalFrameBase is a temporary class the provides a layer of abstraction
21 // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl 23 // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl
22 // that are not overrides from WebLocalFrame will be declared pure virtual in 24 // that are not overrides from WebLocalFrame will be declared pure virtual in
23 // WebLocalFrameBase. Classes that then have a dependency on WebLocalFrameImpl 25 // WebLocalFrameBase. Classes that then have a dependency on WebLocalFrameImpl
24 // will then take a dependency on WebLocalFrameBase instead, so we can remove 26 // will then take a dependency on WebLocalFrameBase instead, so we can remove
25 // cyclic dependencies in web/ and move classes from web/ into core/ or 27 // cyclic dependencies in web/ and move classes from web/ into core/ or
26 // modules. 28 // modules.
27 // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/. 29 // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/.
28 class WebLocalFrameBase : public WebLocalFrame { 30 class WebLocalFrameBase : public GarbageCollectedFinalized<WebLocalFrameBase>,
31 public WebLocalFrame {
29 public: 32 public:
30 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*); 33 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*);
31 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&); 34 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&);
32 35
33 virtual WebViewBase* ViewImpl() const = 0; 36 virtual WebViewBase* ViewImpl() const = 0;
34 virtual WebFrameClient* Client() const = 0; 37 virtual WebFrameClient* Client() const = 0;
35 virtual WebTextCheckClient* TextCheckClient() const = 0; 38 virtual WebTextCheckClient* TextCheckClient() const = 0;
36 virtual void SetContextMenuNode(Node*) = 0; 39 virtual void SetContextMenuNode(Node*) = 0;
37 virtual void ClearContextMenuNode() = 0; 40 virtual void ClearContextMenuNode() = 0;
38 virtual LocalFrame* GetFrame() const = 0; 41 virtual LocalFrame* GetFrame() const = 0;
39 virtual FrameView* GetFrameView() const = 0; 42 virtual FrameView* GetFrameView() const = 0;
43 virtual void InitializeCoreFrame(Page&,
44 FrameOwner*,
45 const AtomicString& name) = 0;
46
47 DEFINE_INLINE_VIRTUAL_TRACE() {}
40 48
41 protected: 49 protected:
42 explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {} 50 explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {}
43 }; 51 };
44 52
45 DEFINE_TYPE_CASTS(WebLocalFrameBase, 53 DEFINE_TYPE_CASTS(WebLocalFrameBase,
46 WebFrame, 54 WebFrame,
47 frame, 55 frame,
48 frame->IsWebLocalFrame(), 56 frame->IsWebLocalFrame(),
49 frame.IsWebLocalFrame()); 57 frame.IsWebLocalFrame());
50 58
51 } // namespace blink 59 } // namespace blink
52 60
53 #endif // WebLocalFrameBase_h 61 #endif // WebLocalFrameBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698