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

Side by Side Diff: sky/engine/core/page/ChromeClient.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/page/Chrome.cpp ('k') | sky/engine/core/page/EventHandler.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, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #ifndef SKY_ENGINE_CORE_PAGE_CHROMECLIENT_H_ 22 #ifndef SKY_ENGINE_CORE_PAGE_CHROMECLIENT_H_
23 #define SKY_ENGINE_CORE_PAGE_CHROMECLIENT_H_ 23 #define SKY_ENGINE_CORE_PAGE_CHROMECLIENT_H_
24 24
25 #include "sky/engine/core/dom/Document.h"
26 #include "sky/engine/core/frame/ConsoleTypes.h" 25 #include "sky/engine/core/frame/ConsoleTypes.h"
27 #include "sky/engine/core/inspector/ConsoleAPITypes.h" 26 #include "sky/engine/core/inspector/ConsoleAPITypes.h"
28 #include "sky/engine/core/loader/NavigationPolicy.h"
29 #include "sky/engine/core/page/FocusType.h" 27 #include "sky/engine/core/page/FocusType.h"
30 #include "sky/engine/core/rendering/style/RenderStyleConstants.h"
31 #include "sky/engine/platform/Cursor.h" 28 #include "sky/engine/platform/Cursor.h"
32 #include "sky/engine/platform/HostWindow.h" 29 #include "sky/engine/public/platform/WebScreenInfo.h"
33 #include "sky/engine/platform/scroll/ScrollTypes.h"
34 #include "sky/engine/wtf/Forward.h" 30 #include "sky/engine/wtf/Forward.h"
35 #include "sky/engine/wtf/PassOwnPtr.h"
36 #include "sky/engine/wtf/Vector.h"
37 31
38 namespace blink { 32 namespace blink {
39 33
40 class ColorChooser;
41 class ColorChooserClient;
42 class DateTimeChooser;
43 class DateTimeChooserClient;
44 class Element; 34 class Element;
45 class FloatRect; 35 class FloatRect;
46 class Frame;
47 class GraphicsContext;
48 class HitTestResult;
49 class IntRect; 36 class IntRect;
50 class LocalFrame; 37 class LocalFrame;
51 class Node; 38 class Node;
52 class Page;
53 class Widget;
54 39
55 struct DateTimeChooserParameters; 40 struct DateTimeChooserParameters;
56 struct GraphicsDeviceAdapter; 41 struct GraphicsDeviceAdapter;
57 42
58 class ChromeClient { 43 class ChromeClient {
59 public: 44 public:
60 virtual void chromeDestroyed() = 0;
61
62 virtual void setWindowRect(const FloatRect&) = 0; 45 virtual void setWindowRect(const FloatRect&) = 0;
63 virtual FloatRect windowRect() = 0; 46 virtual FloatRect windowRect() = 0;
64 47
65 virtual FloatRect pageRect() = 0;
66
67 virtual void focus() = 0; 48 virtual void focus() = 0;
68
69 virtual bool canTakeFocus(FocusType) = 0; 49 virtual bool canTakeFocus(FocusType) = 0;
70 virtual void takeFocus(FocusType) = 0; 50 virtual void takeFocus(FocusType) = 0;
71
72 virtual void focusedNodeChanged(Node*) = 0; 51 virtual void focusedNodeChanged(Node*) = 0;
73
74 virtual void focusedFrameChanged(LocalFrame*) = 0; 52 virtual void focusedFrameChanged(LocalFrame*) = 0;
75 53
76 virtual void show(NavigationPolicy) = 0;
77
78 virtual bool shouldReportDetailedMessageForSource(const String& source) = 0; 54 virtual bool shouldReportDetailedMessageForSource(const String& source) = 0;
79 virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, c onst String& message, unsigned lineNumber, const String& sourceID, const String& stackTrace) = 0; 55 virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, c onst String& message, unsigned lineNumber, const String& sourceID, const String& stackTrace) = 0;
80 56
81 virtual void* webView() const = 0; 57 virtual void* webView() const = 0;
82 58
83 // Methods used by HostWindow. 59 // Methods used by HostWindow.
84 virtual IntRect rootViewToScreen(const IntRect&) const = 0; 60 virtual IntRect rootViewToScreen(const IntRect&) const = 0;
85 virtual blink::WebScreenInfo screenInfo() const = 0; 61 virtual blink::WebScreenInfo screenInfo() const = 0;
86 virtual void setCursor(const Cursor&) = 0;
87 virtual void scheduleVisualUpdate() = 0; 62 virtual void scheduleVisualUpdate() = 0;
88 // End methods used by HostWindow. 63 // End methods used by HostWindow.
89 64
90 virtual void layoutUpdated(LocalFrame*) const { } 65 virtual void setCursor(const Cursor&) = 0;
91 66
92 virtual String acceptLanguages() = 0; 67 virtual String acceptLanguages() = 0;
93 68
94 enum DialogType {
95 AlertDialog = 0,
96 ConfirmDialog = 1,
97 PromptDialog = 2,
98 HTMLDialog = 3
99 };
100
101 virtual FloatSize minimumWindowSize() const { return FloatSize(100, 100); };
102
103 virtual bool isChromeClientImpl() const { return false; }
104
105 // Input mehtod editor related functions.
106 virtual void willSetInputMethodState() { }
107
108 protected: 69 protected:
109 virtual ~ChromeClient() { } 70 virtual ~ChromeClient() { }
110 }; 71 };
111 72
112 } 73 }
113 #endif // SKY_ENGINE_CORE_PAGE_CHROMECLIENT_H_ 74 #endif // SKY_ENGINE_CORE_PAGE_CHROMECLIENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/page/Chrome.cpp ('k') | sky/engine/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698