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

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.h

Issue 2851993002: Move more methods from WebViewImpl to WebViewBase, and cut dependencies. (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
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 30 matching lines...) Expand all
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class CompositorAnimationHost; 44 class CompositorAnimationHost;
45 class GraphicsLayer; 45 class GraphicsLayer;
46 class Page; 46 class Page;
47 class PagePopupChromeClient; 47 class PagePopupChromeClient;
48 class PagePopupClient; 48 class PagePopupClient;
49 class WebLayerTreeView; 49 class WebLayerTreeView;
50 class WebLayer; 50 class WebLayer;
51 class WebViewImpl; 51 class WebViewBase;
52 class LocalDOMWindow; 52 class LocalDOMWindow;
53 53
54 class WebPagePopupImpl final : public WebPagePopup, 54 class WebPagePopupImpl final : public WebPagePopup,
55 public PageWidgetEventHandler, 55 public PageWidgetEventHandler,
56 public PagePopup, 56 public PagePopup,
57 public RefCounted<WebPagePopupImpl> { 57 public RefCounted<WebPagePopupImpl> {
58 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); 58 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl);
59 USING_FAST_MALLOC(WebPagePopupImpl); 59 USING_FAST_MALLOC(WebPagePopupImpl);
60 60
61 public: 61 public:
62 ~WebPagePopupImpl() override; 62 ~WebPagePopupImpl() override;
63 bool Initialize(WebViewImpl*, PagePopupClient*); 63 bool Initialize(WebViewBase*, PagePopupClient*);
64 void ClosePopup(); 64 void ClosePopup();
65 WebWidgetClient* WidgetClient() const { return widget_client_; } 65 WebWidgetClient* WidgetClient() const { return widget_client_; }
66 bool HasSamePopupClient(WebPagePopupImpl* other) { 66 bool HasSamePopupClient(WebPagePopupImpl* other) {
67 return other && popup_client_ == other->popup_client_; 67 return other && popup_client_ == other->popup_client_;
68 } 68 }
69 LocalDOMWindow* Window(); 69 LocalDOMWindow* Window();
70 void LayoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override; 70 void LayoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override;
71 void CompositeAndReadbackAsync( 71 void CompositeAndReadbackAsync(
72 WebCompositeAndReadbackAsyncCallback*) override; 72 WebCompositeAndReadbackAsyncCallback*) override;
73 WebPoint PositionRelativeToOwner() override; 73 WebPoint PositionRelativeToOwner() override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 explicit WebPagePopupImpl(WebWidgetClient*); 109 explicit WebPagePopupImpl(WebWidgetClient*);
110 bool InitializePage(); 110 bool InitializePage();
111 void DestroyPage(); 111 void DestroyPage();
112 void InitializeLayerTreeView(); 112 void InitializeLayerTreeView();
113 void SetRootGraphicsLayer(GraphicsLayer*); 113 void SetRootGraphicsLayer(GraphicsLayer*);
114 114
115 WebRect WindowRectInScreen() const; 115 WebRect WindowRectInScreen() const;
116 116
117 WebWidgetClient* widget_client_; 117 WebWidgetClient* widget_client_;
118 WebViewImpl* web_view_; 118 WebViewBase* web_view_;
119 Persistent<Page> page_; 119 Persistent<Page> page_;
120 Persistent<PagePopupChromeClient> chrome_client_; 120 Persistent<PagePopupChromeClient> chrome_client_;
121 PagePopupClient* popup_client_; 121 PagePopupClient* popup_client_;
122 bool closing_; 122 bool closing_;
123 123
124 WebLayerTreeView* layer_tree_view_; 124 WebLayerTreeView* layer_tree_view_;
125 WebLayer* root_layer_; 125 WebLayer* root_layer_;
126 GraphicsLayer* root_graphics_layer_; 126 GraphicsLayer* root_graphics_layer_;
127 std::unique_ptr<CompositorAnimationHost> animation_host_; 127 std::unique_ptr<CompositorAnimationHost> animation_host_;
128 bool is_accelerated_compositing_active_; 128 bool is_accelerated_compositing_active_;
129 129
130 friend class WebPagePopup; 130 friend class WebPagePopup;
131 friend class PagePopupChromeClient; 131 friend class PagePopupChromeClient;
132 }; 132 };
133 133
134 DEFINE_TYPE_CASTS(WebPagePopupImpl, 134 DEFINE_TYPE_CASTS(WebPagePopupImpl,
135 WebWidget, 135 WebWidget,
136 widget, 136 widget,
137 widget->IsPagePopup(), 137 widget->IsPagePopup(),
138 widget.IsPagePopup()); 138 widget.IsPagePopup());
139 // WebPagePopupImpl is the only implementation of PagePopup, so no 139 // WebPagePopupImpl is the only implementation of PagePopup, so no
140 // further checking required. 140 // further checking required.
141 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); 141 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true);
142 142
143 } // namespace blink 143 } // namespace blink
144 #endif // WebPagePopupImpl_h 144 #endif // WebPagePopupImpl_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PopupMenuImpl.cpp ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698