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

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

Issue 2881693002: Move more classes to WebLocalFrameBase instead of WebLocalFrameImpl. (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/TextFinder.h » ('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 FrameOwner;
14 class FrameView; 14 class FrameView;
15 class LocalFrame; 15 class LocalFrame;
16 class Node; 16 class Node;
17 class Page; 17 class Page;
18 class TextFinder;
19 class WebDevToolsAgentImpl;
18 class WebFrameClient; 20 class WebFrameClient;
21 class WebFrameWidgetBase;
19 class WebTextCheckClient; 22 class WebTextCheckClient;
20 class WebViewBase; 23 class WebViewBase;
21 24
22 // WebLocalFrameBase is a temporary class the provides a layer of abstraction 25 // WebLocalFrameBase is a temporary class the provides a layer of abstraction
23 // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl 26 // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl
24 // that are not overrides from WebLocalFrame will be declared pure virtual in 27 // that are not overrides from WebLocalFrame will be declared pure virtual in
25 // WebLocalFrameBase. Classes that then have a dependency on WebLocalFrameImpl 28 // WebLocalFrameBase. Classes that then have a dependency on WebLocalFrameImpl
26 // will then take a dependency on WebLocalFrameBase instead, so we can remove 29 // will then take a dependency on WebLocalFrameBase instead, so we can remove
27 // cyclic dependencies in web/ and move classes from web/ into core/ or 30 // cyclic dependencies in web/ and move classes from web/ into core/ or
28 // modules. 31 // modules.
29 // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/. 32 // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/.
30 class WebLocalFrameBase : public GarbageCollectedFinalized<WebLocalFrameBase>, 33 class WebLocalFrameBase : public GarbageCollectedFinalized<WebLocalFrameBase>,
31 public WebLocalFrame { 34 public WebLocalFrame {
32 public: 35 public:
33 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*); 36 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*);
34 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&); 37 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&);
35 38
36 virtual WebViewBase* ViewImpl() const = 0; 39 virtual WebViewBase* ViewImpl() const = 0;
37 virtual WebFrameClient* Client() const = 0; 40 virtual WebFrameClient* Client() const = 0;
41 virtual void SetClient(WebFrameClient*) = 0;
38 virtual WebTextCheckClient* TextCheckClient() const = 0; 42 virtual WebTextCheckClient* TextCheckClient() const = 0;
39 virtual void SetContextMenuNode(Node*) = 0; 43 virtual void SetContextMenuNode(Node*) = 0;
40 virtual void ClearContextMenuNode() = 0; 44 virtual void ClearContextMenuNode() = 0;
41 virtual LocalFrame* GetFrame() const = 0; 45 virtual LocalFrame* GetFrame() const = 0;
42 virtual FrameView* GetFrameView() const = 0; 46 virtual FrameView* GetFrameView() const = 0;
43 virtual void InitializeCoreFrame(Page&, 47 virtual void InitializeCoreFrame(Page&,
44 FrameOwner*, 48 FrameOwner*,
45 const AtomicString& name) = 0; 49 const AtomicString& name) = 0;
50 virtual TextFinder& EnsureTextFinder() = 0;
51 virtual void SetFrameWidget(WebFrameWidgetBase*) = 0;
52 virtual WebDevToolsAgentImpl* DevToolsAgentImpl() const = 0;
46 53
47 DEFINE_INLINE_VIRTUAL_TRACE() {} 54 DEFINE_INLINE_VIRTUAL_TRACE() {}
48 55
49 protected: 56 protected:
50 explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {} 57 explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {}
51 }; 58 };
52 59
53 DEFINE_TYPE_CASTS(WebLocalFrameBase, 60 DEFINE_TYPE_CASTS(WebLocalFrameBase,
54 WebFrame, 61 WebFrame,
55 frame, 62 frame,
56 frame->IsWebLocalFrame(), 63 frame->IsWebLocalFrame(),
57 frame.IsWebLocalFrame()); 64 frame.IsWebLocalFrame());
58 65
59 } // namespace blink 66 } // namespace blink
60 67
61 #endif // WebLocalFrameBase_h 68 #endif // WebLocalFrameBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/TextFinder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698