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

Side by Side Diff: Source/web/ChromeClientImpl.h

Issue 1162953002: Cleanup: Move PopupOpeningObserver ownership from ChromeClient to ChromeClientImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual WebScreenInfo screenInfo() const override; 113 virtual WebScreenInfo screenInfo() const override;
114 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const override ; 114 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const override ;
115 virtual void pageScaleFactorChanged() const override; 115 virtual void pageScaleFactorChanged() const override;
116 virtual float clampPageScaleFactorToLimits(float scale) const override; 116 virtual float clampPageScaleFactorToLimits(float scale) const override;
117 virtual void layoutUpdated(LocalFrame*) const override; 117 virtual void layoutUpdated(LocalFrame*) const override;
118 virtual void showMouseOverURL(const HitTestResult&) override; 118 virtual void showMouseOverURL(const HitTestResult&) override;
119 virtual void setToolTip(const WTF::String& tooltipText, TextDirection) overr ide; 119 virtual void setToolTip(const WTF::String& tooltipText, TextDirection) overr ide;
120 virtual void dispatchViewportPropertiesDidChange(const ViewportDescription&) const override; 120 virtual void dispatchViewportPropertiesDidChange(const ViewportDescription&) const override;
121 virtual void printInternal(LocalFrame*) override; 121 virtual void printInternal(LocalFrame*) override;
122 virtual void annotatedRegionsChanged() override; 122 virtual void annotatedRegionsChanged() override;
123 virtual PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooserInternal(Loca lFrame*, ColorChooserClient*, const Color&) override; 123 virtual PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooser(LocalFrame*, ColorChooserClient*, const Color&) override;
124 virtual PassRefPtr<DateTimeChooser> openDateTimeChooserInternal(DateTimeChoo serClient*, const DateTimeChooserParameters&) override; 124 virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClien t*, const DateTimeChooserParameters&) override;
125 virtual void runOpenPanelInternal(LocalFrame*, PassRefPtr<FileChooser>) over ride; 125 virtual void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>) override;
126 virtual void enumerateChosenDirectory(FileChooser*) override; 126 virtual void enumerateChosenDirectory(FileChooser*) override;
127 virtual void setCursorInternal(const Cursor&) override; 127 virtual void setCursorInternal(const Cursor&) override;
128 virtual void needTouchEvents(bool needTouchEvents) override; 128 virtual void needTouchEvents(bool needTouchEvents) override;
129 virtual void setTouchAction(TouchAction) override; 129 virtual void setTouchAction(TouchAction) override;
130 130
131 virtual GraphicsLayerFactory* graphicsLayerFactory() const override; 131 virtual GraphicsLayerFactory* graphicsLayerFactory() const override;
132 132
133 // Pass 0 as the GraphicsLayer to detatch the root layer. 133 // Pass 0 as the GraphicsLayer to detatch the root layer.
134 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override; 134 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override;
135 135
136 virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) override; 136 virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) override;
137 virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) override; 137 virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) override;
138 138
139 virtual void enterFullScreenForElement(Element*) override; 139 virtual void enterFullScreenForElement(Element*) override;
140 virtual void exitFullScreenForElement(Element*) override; 140 virtual void exitFullScreenForElement(Element*) override;
141 141
142 virtual void clearCompositedSelection() override; 142 virtual void clearCompositedSelection() override;
143 virtual void updateCompositedSelection(const CompositedSelection&) override; 143 virtual void updateCompositedSelection(const CompositedSelection&) override;
144 144
145 // ChromeClient methods: 145 // ChromeClient methods:
146 virtual void postAccessibilityNotification(AXObject*, AXObjectCache::AXNotif ication) override; 146 virtual void postAccessibilityNotification(AXObject*, AXObjectCache::AXNotif ication) override;
147 virtual String acceptLanguages() override; 147 virtual String acceptLanguages() override;
148 148
149 // ChromeClientImpl: 149 // ChromeClientImpl:
150 void setCursorForPlugin(const WebCursorInfo&); 150 void setCursorForPlugin(const WebCursorInfo&);
151 void setNewWindowNavigationPolicy(WebNavigationPolicy); 151 void setNewWindowNavigationPolicy(WebNavigationPolicy);
152 152
153 virtual bool hasOpenedPopup() const override; 153 virtual bool hasOpenedPopup() const override;
154 virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenuInternal(LocalFrame &, PopupMenuClient*) override; 154 virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, Popup MenuClient*) override;
155 PagePopup* openPagePopup(PagePopupClient*); 155 PagePopup* openPagePopup(PagePopupClient*);
156 void closePagePopup(PagePopup*); 156 void closePagePopup(PagePopup*);
157 virtual DOMWindow* pagePopupWindowForTesting() const override; 157 virtual DOMWindow* pagePopupWindowForTesting() const override;
158 158
159 virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, cons t String& dialogMessage, Document::PageDismissalType) const override; 159 virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, cons t String& dialogMessage, Document::PageDismissalType) const override;
160 160
161 virtual bool requestPointerLock() override; 161 virtual bool requestPointerLock() override;
162 virtual void requestPointerUnlock() override; 162 virtual void requestPointerUnlock() override;
163 163
164 // AutofillClient pass throughs: 164 // AutofillClient pass throughs:
165 virtual void didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMem ber<Element>>&, LocalFrame*) override; 165 virtual void didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMem ber<Element>>&, LocalFrame*) override;
166 virtual void handleKeyboardEventOnTextField(HTMLInputElement&, KeyboardEvent &) override; 166 virtual void handleKeyboardEventOnTextField(HTMLInputElement&, KeyboardEvent &) override;
167 virtual void didChangeValueInTextField(HTMLFormControlElement&) override; 167 virtual void didChangeValueInTextField(HTMLFormControlElement&) override;
168 virtual void didEndEditingOnTextField(HTMLInputElement&) override; 168 virtual void didEndEditingOnTextField(HTMLInputElement&) override;
169 virtual void openTextDataListChooserInternal(HTMLInputElement&) override; 169 virtual void openTextDataListChooser(HTMLInputElement&) override;
170 virtual void textFieldDataListChanged(HTMLInputElement&) override; 170 virtual void textFieldDataListChanged(HTMLInputElement&) override;
171 virtual void xhrSucceeded(LocalFrame*) override; 171 virtual void xhrSucceeded(LocalFrame*) override;
172 172
173 virtual void didCancelCompositionOnSelectionChange() override; 173 virtual void didCancelCompositionOnSelectionChange() override;
174 virtual void willSetInputMethodState() override; 174 virtual void willSetInputMethodState() override;
175 virtual void didUpdateTextOfFocusedElementByNonUserInput() override; 175 virtual void didUpdateTextOfFocusedElementByNonUserInput() override;
176 virtual void showImeIfNeeded() override; 176 virtual void showImeIfNeeded() override;
177 177
178 virtual void registerViewportLayers() const override; 178 virtual void registerViewportLayers() const override;
179 179
180 virtual void showUnhandledTapUIIfNeeded(IntPoint, Node*, bool) override; 180 virtual void showUnhandledTapUIIfNeeded(IntPoint, Node*, bool) override;
181 virtual void didUpdateTopControls() const override; 181 virtual void didUpdateTopControls() const override;
182 182
183 private: 183 private:
184 virtual bool isChromeClientImpl() const override { return true; } 184 bool isChromeClientImpl() const override { return true; }
185 void registerPopupOpeningObserver(PopupOpeningObserver*) override;
186 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override;
185 187
188 void notifyPopupOpeningObservers() const;
186 void setCursor(const WebCursorInfo&); 189 void setCursor(const WebCursorInfo&);
187 190
188 WebViewImpl* m_webView; // weak pointer 191 WebViewImpl* m_webView; // weak pointer
189 WindowFeatures m_windowFeatures; 192 WindowFeatures m_windowFeatures;
190 193
191 PagePopupDriver* m_pagePopupDriver; 194 PagePopupDriver* m_pagePopupDriver;
195 Vector<PopupOpeningObserver*> m_popupOpeningObservers;
192 }; 196 };
193 197
194 DEFINE_TYPE_CASTS(ChromeClientImpl, ChromeClient, client, client->isChromeClient Impl(), client.isChromeClientImpl()); 198 DEFINE_TYPE_CASTS(ChromeClientImpl, ChromeClient, client, client->isChromeClient Impl(), client.isChromeClientImpl());
195 199
196 } // namespace blink 200 } // namespace blink
197 201
198 #endif 202 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698