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

Side by Side Diff: sky/engine/core/loader/EmptyClients.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/core/html/HTMLAnchorElement.cpp ('k') | sky/engine/core/loader/EmptyClients.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) 2006 Eric Seidel (eric@webkit.org) 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org)
3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 This file was first created for SVGImage as it had no way to access the current Page (nor should it, 51 This file was first created for SVGImage as it had no way to access the current Page (nor should it,
52 since Images are not tied to a page). 52 since Images are not tied to a page).
53 See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion abo ut this file. 53 See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion abo ut this file.
54 54
55 Ideally, whenever you change a Client class, you should add a stub here. 55 Ideally, whenever you change a Client class, you should add a stub here.
56 Brittle, yes. Unfortunate, yes. Hopefully temporary. 56 Brittle, yes. Unfortunate, yes. Hopefully temporary.
57 */ 57 */
58 58
59 namespace blink { 59 namespace blink {
60 60
61 class EmptyChromeClient : public ChromeClient {
62 WTF_MAKE_FAST_ALLOCATED;
63 public:
64 virtual ~EmptyChromeClient() { }
65 virtual void chromeDestroyed() override { }
66
67 virtual void* webView() const override { return 0; }
68 virtual void setWindowRect(const FloatRect&) override { }
69 virtual FloatRect windowRect() override { return FloatRect(); }
70
71 virtual FloatRect pageRect() override { return FloatRect(); }
72
73 virtual void focus() override { }
74
75 virtual bool canTakeFocus(FocusType) override { return false; }
76 virtual void takeFocus(FocusType) override { }
77
78 virtual void focusedNodeChanged(Node*) override { }
79 virtual void focusedFrameChanged(LocalFrame*) override { }
80 virtual void show(NavigationPolicy) override { }
81
82 virtual bool shouldReportDetailedMessageForSource(const String&) override { return false; }
83 virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, c onst String&, unsigned, const String&, const String&) override { }
84
85 virtual void scheduleVisualUpdate() override { }
86
87 virtual IntRect rootViewToScreen(const IntRect& r) const override { return r ; }
88 virtual blink::WebScreenInfo screenInfo() const override { return blink::Web ScreenInfo(); }
89
90 virtual void setCursor(const Cursor&) override { }
91
92 virtual String acceptLanguages() override;
93 };
94
95 class EmptyFrameLoaderClient : public FrameLoaderClient { 61 class EmptyFrameLoaderClient : public FrameLoaderClient {
96 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); WTF_MAKE_FAST_ALLOCATED; 62 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); WTF_MAKE_FAST_ALLOCATED;
97 public: 63 public:
98 EmptyFrameLoaderClient() { } 64 EmptyFrameLoaderClient() { }
99 virtual ~EmptyFrameLoaderClient() { } 65 virtual ~EmptyFrameLoaderClient() { }
100 66
101 virtual void detachedFromParent() override { } 67 virtual void detachedFromParent() override { }
102 68
103 virtual void dispatchWillSendRequest(Document*, unsigned long, ResourceReque st&, const ResourceResponse&) override { } 69 virtual void dispatchWillSendRequest(Document*, unsigned long, ResourceReque st&, const ResourceResponse&) override { }
104 virtual void dispatchDidReceiveResponse(Document*, unsigned long, const Reso urceResponse&) override { } 70 virtual void dispatchDidReceiveResponse(Document*, unsigned long, const Reso urceResponse&) override { }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 virtual bool canPaste(LocalFrame*, bool defaultValue) const override { retur n defaultValue; } 139 virtual bool canPaste(LocalFrame*, bool defaultValue) const override { retur n defaultValue; }
174 140
175 virtual bool handleKeyboardEvent() override { return false; } 141 virtual bool handleKeyboardEvent() override { return false; }
176 }; 142 };
177 143
178 void fillWithEmptyClients(Page::PageClients&); 144 void fillWithEmptyClients(Page::PageClients&);
179 145
180 } 146 }
181 147
182 #endif // SKY_ENGINE_CORE_LOADER_EMPTYCLIENTS_H_ 148 #endif // SKY_ENGINE_CORE_LOADER_EMPTYCLIENTS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLAnchorElement.cpp ('k') | sky/engine/core/loader/EmptyClients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698