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

Side by Side Diff: sky/engine/web/WebViewImpl.h

Issue 878673005: Get rid of Chrome, use Page. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/web/WebLocalFrameImpl.cpp ('k') | sky/engine/web/WebViewImpl.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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SKY_ENGINE_WEB_WEBVIEWIMPL_H_ 31 #ifndef SKY_ENGINE_WEB_WEBVIEWIMPL_H_
32 #define SKY_ENGINE_WEB_WEBVIEWIMPL_H_ 32 #define SKY_ENGINE_WEB_WEBVIEWIMPL_H_
33 33
34 #include "sky/engine/core/rendering/HitTestResult.h"
34 #include "sky/engine/platform/geometry/IntPoint.h" 35 #include "sky/engine/platform/geometry/IntPoint.h"
35 #include "sky/engine/platform/geometry/IntRect.h" 36 #include "sky/engine/platform/geometry/IntRect.h"
36 #include "sky/engine/public/platform/WebInputEvent.h" 37 #include "sky/engine/public/platform/WebInputEvent.h"
37 #include "sky/engine/public/platform/WebLayer.h" 38 #include "sky/engine/public/platform/WebLayer.h"
38 #include "sky/engine/public/platform/WebPoint.h" 39 #include "sky/engine/public/platform/WebPoint.h"
39 #include "sky/engine/public/platform/WebRect.h" 40 #include "sky/engine/public/platform/WebRect.h"
40 #include "sky/engine/public/platform/WebSize.h" 41 #include "sky/engine/public/platform/WebSize.h"
41 #include "sky/engine/public/platform/WebString.h" 42 #include "sky/engine/public/platform/WebString.h"
42 #include "sky/engine/public/web/WebNavigationPolicy.h" 43 #include "sky/engine/public/web/WebNavigationPolicy.h"
43 #include "sky/engine/public/web/WebView.h" 44 #include "sky/engine/public/web/WebView.h"
44 #include "sky/engine/web/ChromeClientImpl.h" 45 #include "sky/engine/web/ChromeClientImpl.h"
45 #include "sky/engine/web/EditorClientImpl.h" 46 #include "sky/engine/web/EditorClientImpl.h"
46 #include "sky/engine/web/SpellCheckerClientImpl.h" 47 #include "sky/engine/web/SpellCheckerClientImpl.h"
47 #include "sky/engine/wtf/OwnPtr.h" 48 #include "sky/engine/wtf/OwnPtr.h"
48 #include "sky/engine/wtf/RefCounted.h" 49 #include "sky/engine/wtf/RefCounted.h"
49 #include "sky/engine/wtf/Vector.h" 50 #include "sky/engine/wtf/Vector.h"
50 51
51 namespace blink { 52 namespace blink {
52 53
53 class Frame; 54 class Frame;
54 class WebLocalFrameImpl; 55 class WebLocalFrameImpl;
55 class WebImage; 56 class WebImage;
56 class WebSettingsImpl; 57 class WebSettingsImpl;
58 class Page;
57 59
58 class WebViewImpl final : public WebView, public RefCounted<WebViewImpl> { 60 class WebViewImpl final : public WebView, public RefCounted<WebViewImpl> {
59 public: 61 public:
60 static WebViewImpl* create(WebViewClient*); 62 static WebViewImpl* create(WebViewClient*);
61 63
62 // WebWidget methods: 64 // WebWidget methods:
63 virtual void close() override; 65 virtual void close() override;
64 virtual WebSize size() override; 66 virtual WebSize size() override;
65 67
66 virtual void resize(const WebSize&) override; 68 virtual void resize(const WebSize&) override;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Returns the main frame associated with this view. This may be null when 149 // Returns the main frame associated with this view. This may be null when
148 // the page is shutting down, but will be valid at all other times. 150 // the page is shutting down, but will be valid at all other times.
149 WebLocalFrameImpl* mainFrameImpl(); 151 WebLocalFrameImpl* mainFrameImpl();
150 152
151 // Notifies the WebView that a load has been committed. isNewNavigation 153 // Notifies the WebView that a load has been committed. isNewNavigation
152 // will be true if a new session history item should be created for that 154 // will be true if a new session history item should be created for that
153 // load. isNavigationWithinPage will be true if the navigation does 155 // load. isNavigationWithinPage will be true if the navigation does
154 // not take the user away from the current page. 156 // not take the user away from the current page.
155 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage); 157 void didCommitLoad(bool isNewNavigation, bool isNavigationWithinPage);
156 158
157 // Indicates two things:
158 // 1) This view may have a new layout now.
159 // 2) Calling layout() is a no-op.
160 // After calling WebWidget::layout(), expect to get this notification
161 // unless the view did not need a layout.
162 void layoutUpdated(WebLocalFrameImpl*);
163
164 void updateMainFrameLayoutSize(); 159 void updateMainFrameLayoutSize();
165 160
166 void scheduleVisualUpdate(); 161 void scheduleVisualUpdate();
167 162
168 virtual void setVisibilityState(WebPageVisibilityState, bool) override; 163 virtual void setVisibilityState(WebPageVisibilityState, bool) override;
169 164
170 // Exposed for the purpose of overriding device metrics. 165 // Exposed for the purpose of overriding device metrics.
171 void sendResizeEventAndRepaint(); 166 void sendResizeEventAndRepaint();
172 167
173 WebSettingsImpl* settingsImpl(); 168 WebSettingsImpl* settingsImpl();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 WebColor m_backgroundColorOverride; 258 WebColor m_backgroundColorOverride;
264 }; 259 };
265 260
266 // We have no ways to check if the specified WebView is an instance of 261 // We have no ways to check if the specified WebView is an instance of
267 // WebViewImpl because WebViewImpl is the only implementation of WebView. 262 // WebViewImpl because WebViewImpl is the only implementation of WebView.
268 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 263 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
269 264
270 } // namespace blink 265 } // namespace blink
271 266
272 #endif // SKY_ENGINE_WEB_WEBVIEWIMPL_H_ 267 #endif // SKY_ENGINE_WEB_WEBVIEWIMPL_H_
OLDNEW
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.cpp ('k') | sky/engine/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698