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

Side by Side Diff: third_party/WebKit/Source/core/page/ChromeClient.h

Issue 2177333002: Move setWindowRect and windowRect calls from WebViewClient to WebWidgetClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change CHECK to a DCHECK Created 4 years, 4 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) 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 *
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 struct ViewportDescription; 78 struct ViewportDescription;
79 struct WebPoint; 79 struct WebPoint;
80 struct WindowFeatures; 80 struct WindowFeatures;
81 81
82 class CORE_EXPORT ChromeClient : public HostWindow { 82 class CORE_EXPORT ChromeClient : public HostWindow {
83 public: 83 public:
84 virtual void chromeDestroyed() = 0; 84 virtual void chromeDestroyed() = 0;
85 85
86 // The specified rectangle is adjusted for the minimum window size and the 86 // The specified rectangle is adjusted for the minimum window size and the
87 // screen, then setWindowRect with the adjusted rectangle is called. 87 // screen, then setWindowRect with the adjusted rectangle is called.
88 void setWindowRectWithAdjustment(const IntRect&); 88 void setWindowRectWithAdjustment(const IntRect&, LocalFrame*);
dcheng 2016/08/15 18:22:44 Let's make this a LocalFrame&.
lfg 2016/08/16 21:02:13 I know this is blink, but this goes against the go
dcheng 2016/08/16 21:03:46 We have a strong convention of passing never-null
89 virtual IntRect windowRect() = 0; 89 virtual IntRect rootWindowRect() = 0;
90 90
91 virtual IntRect pageRect() = 0; 91 virtual IntRect pageRect() = 0;
92 92
93 virtual void focus() = 0; 93 virtual void focus() = 0;
94 94
95 virtual bool canTakeFocus(WebFocusType) = 0; 95 virtual bool canTakeFocus(WebFocusType) = 0;
96 virtual void takeFocus(WebFocusType) = 0; 96 virtual void takeFocus(WebFocusType) = 0;
97 97
98 virtual void focusedNodeChanged(Node*, Node*) = 0; 98 virtual void focusedNodeChanged(Node*, Node*) = 0;
99 99
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 virtual std::unique_ptr<WebFrameScheduler> createFrameScheduler(BlameContext *) = 0; 282 virtual std::unique_ptr<WebFrameScheduler> createFrameScheduler(BlameContext *) = 0;
283 283
284 // Returns the time of the beginning of the last beginFrame, in seconds, if any, and 0.0 otherwise. 284 // Returns the time of the beginning of the last beginFrame, in seconds, if any, and 0.0 otherwise.
285 virtual double lastFrameTimeMonotonic() const { return 0.0; } 285 virtual double lastFrameTimeMonotonic() const { return 0.0; }
286 286
287 protected: 287 protected:
288 ~ChromeClient() override { } 288 ~ChromeClient() override { }
289 289
290 virtual void showMouseOverURL(const HitTestResult&) = 0; 290 virtual void showMouseOverURL(const HitTestResult&) = 0;
291 virtual void setWindowRect(const IntRect&) = 0; 291 virtual void setWindowRect(const IntRect&, LocalFrame*) = 0;
dcheng 2016/08/15 18:22:44 Ditto
292 virtual bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, bool isReload ) = 0; 292 virtual bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, bool isReload ) = 0;
293 virtual bool openJavaScriptAlertDelegate(LocalFrame*, const String&) = 0; 293 virtual bool openJavaScriptAlertDelegate(LocalFrame*, const String&) = 0;
294 virtual bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) = 0; 294 virtual bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) = 0;
295 virtual bool openJavaScriptPromptDelegate(LocalFrame*, const String& message , const String& defaultValue, String& result) = 0; 295 virtual bool openJavaScriptPromptDelegate(LocalFrame*, const String& message , const String& defaultValue, String& result) = 0;
296 virtual void printDelegate(LocalFrame*) = 0; 296 virtual void printDelegate(LocalFrame*) = 0;
297 297
298 private: 298 private:
299 bool canOpenModalIfDuringPageDismissal(Frame* mainFrame, DialogType, const S tring& message); 299 bool canOpenModalIfDuringPageDismissal(Frame* mainFrame, DialogType, const S tring& message);
300 void setToolTip(const HitTestResult&); 300 void setToolTip(const HitTestResult&);
301 301
302 LayoutPoint m_lastToolTipPoint; 302 LayoutPoint m_lastToolTipPoint;
303 String m_lastToolTipText; 303 String m_lastToolTipText;
304 304
305 FRIEND_TEST_ALL_PREFIXES(ChromeClientTest, SetToolTipFlood); 305 FRIEND_TEST_ALL_PREFIXES(ChromeClientTest, SetToolTipFlood);
306 }; 306 };
307 307
308 } // namespace blink 308 } // namespace blink
309 309
310 #endif // ChromeClient_h 310 #endif // ChromeClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698