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

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

Issue 2867073005: Provide downcasts for WebLocalFrameBase using DEFINE_TYPE_CASTS macro. (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/WebDOMFileSystem.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 FrameView;
13 class LocalFrame; 14 class LocalFrame;
14 class Node; 15 class Node;
15 class WebFrameClient; 16 class WebFrameClient;
16 class WebTextCheckClient; 17 class WebTextCheckClient;
17 class WebViewBase; 18 class WebViewBase;
18 19
19 // WebLocalFrameBase is a temporary class the provides a layer of abstraction 20 // WebLocalFrameBase is a temporary class the provides a layer of abstraction
20 // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl 21 // for WebLocalFrameImpl. Mehtods that are declared public in WebLocalFrameImpl
21 // that are not overrides from WebLocalFrame will be declared pure virtual in 22 // that are not overrides from WebLocalFrame will be declared pure virtual in
22 // WebLocalFrameBase. Classes that then have a dependency on WebLocalFrameImpl 23 // WebLocalFrameBase. Classes that then have a dependency on WebLocalFrameImpl
23 // will then take a dependency on WebLocalFrameBase instead, so we can remove 24 // will then take a dependency on WebLocalFrameBase instead, so we can remove
24 // cyclic dependencies in web/ and move classes from web/ into core/ or 25 // cyclic dependencies in web/ and move classes from web/ into core/ or
25 // modules. 26 // modules.
26 // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/. 27 // TODO(slangley): Remove this class once WebLocalFrameImpl is in core/.
27 class WebLocalFrameBase : public WebLocalFrame { 28 class WebLocalFrameBase : public WebLocalFrame {
28 public: 29 public:
29 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*); 30 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*);
30 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&); 31 CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame&);
31 32
32 virtual WebViewBase* ViewImpl() const = 0; 33 virtual WebViewBase* ViewImpl() const = 0;
33 virtual WebFrameClient* Client() const = 0; 34 virtual WebFrameClient* Client() const = 0;
34 virtual WebTextCheckClient* TextCheckClient() const = 0; 35 virtual WebTextCheckClient* TextCheckClient() const = 0;
35 virtual void SetContextMenuNode(Node*) = 0; 36 virtual void SetContextMenuNode(Node*) = 0;
36 virtual void ClearContextMenuNode() = 0; 37 virtual void ClearContextMenuNode() = 0;
38 virtual LocalFrame* GetFrame() const = 0;
39 virtual FrameView* GetFrameView() const = 0;
37 40
38 protected: 41 protected:
39 explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {} 42 explicit WebLocalFrameBase(WebTreeScopeType scope) : WebLocalFrame(scope) {}
40 }; 43 };
41 } 44
45 DEFINE_TYPE_CASTS(WebLocalFrameBase,
46 WebFrame,
47 frame,
48 frame->IsWebLocalFrame(),
49 frame.IsWebLocalFrame());
50
51 } // namespace blink
42 52
43 #endif // WebLocalFrameBase_h 53 #endif // WebLocalFrameBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebDOMFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698