OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 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 15 matching lines...) Expand all Loading... |
26 #include "core/frame/LocalFrame.h" | 26 #include "core/frame/LocalFrame.h" |
27 #include "core/html/HTMLInputElement.h" | 27 #include "core/html/HTMLInputElement.h" |
28 #include "core/inspector/InspectorInstrumentation.h" | 28 #include "core/inspector/InspectorInstrumentation.h" |
29 #include "core/layout/HitTestResult.h" | 29 #include "core/layout/HitTestResult.h" |
30 #include "core/page/FrameTree.h" | 30 #include "core/page/FrameTree.h" |
31 #include "core/page/ScopedPageLoadDeferrer.h" | 31 #include "core/page/ScopedPageLoadDeferrer.h" |
32 #include "core/page/WindowFeatures.h" | 32 #include "core/page/WindowFeatures.h" |
33 #include "platform/geometry/IntRect.h" | 33 #include "platform/geometry/IntRect.h" |
34 #include "platform/network/NetworkHints.h" | 34 #include "platform/network/NetworkHints.h" |
35 #include "public/platform/WebScreenInfo.h" | 35 #include "public/platform/WebScreenInfo.h" |
36 #include "wtf/Utility.h" | |
37 #include <algorithm> | 36 #include <algorithm> |
| 37 #include <utility> |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 void ChromeClient::setWindowRectWithAdjustment(const IntRect& pendingRect) | 41 void ChromeClient::setWindowRectWithAdjustment(const IntRect& pendingRect) |
42 { | 42 { |
43 IntRect screen = screenInfo().availableRect; | 43 IntRect screen = screenInfo().availableRect; |
44 IntRect window = pendingRect; | 44 IntRect window = pendingRect; |
45 | 45 |
46 IntSize minimumSize = minimumWindowSize(); | 46 IntSize minimumSize = minimumWindowSize(); |
47 // Let size 0 pass through, since that indicates default size, not minimum | 47 // Let size 0 pass through, since that indicates default size, not minimum |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const String& message, | 86 const String& message, |
87 ChromeClient::DialogType dialogType, | 87 ChromeClient::DialogType dialogType, |
88 Args&&... args) | 88 Args&&... args) |
89 { | 89 { |
90 // Defer loads in case the client method runs a new event loop that would | 90 // Defer loads in case the client method runs a new event loop that would |
91 // otherwise cause the load to continue while we're in the middle of | 91 // otherwise cause the load to continue while we're in the middle of |
92 // executing JavaScript. | 92 // executing JavaScript. |
93 ScopedPageLoadDeferrer deferrer; | 93 ScopedPageLoadDeferrer deferrer; |
94 | 94 |
95 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(&frame, message, dialogType); | 95 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(&frame, message, dialogType); |
96 bool result = (chromeClient->*function)(&frame, message, WTF::forward<Args>(
args)...); | 96 bool result = (chromeClient->*function)(&frame, message, std::forward<Args>(
args)...); |
97 InspectorInstrumentation::didRunJavaScriptDialog(cookie, result); | 97 InspectorInstrumentation::didRunJavaScriptDialog(cookie, result); |
98 return result; | 98 return result; |
99 } | 99 } |
100 | 100 |
101 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, LocalFram
e* frame, bool isReload) | 101 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, LocalFram
e* frame, bool isReload) |
102 { | 102 { |
103 ASSERT(frame); | 103 ASSERT(frame); |
104 return openJavaScriptDialog(this, &ChromeClient::openBeforeUnloadConfirmPane
lDelegate, *frame, message, ChromeClient::HTMLDialog, isReload); | 104 return openJavaScriptDialog(this, &ChromeClient::openBeforeUnloadConfirmPane
lDelegate, *frame, message, ChromeClient::HTMLDialog, isReload); |
105 } | 105 } |
106 | 106 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 { | 174 { |
175 // Defer loads in case the client method runs a new event loop that would | 175 // Defer loads in case the client method runs a new event loop that would |
176 // otherwise cause the load to continue while we're in the middle of | 176 // otherwise cause the load to continue while we're in the middle of |
177 // executing JavaScript. | 177 // executing JavaScript. |
178 ScopedPageLoadDeferrer deferrer; | 178 ScopedPageLoadDeferrer deferrer; |
179 | 179 |
180 printDelegate(frame); | 180 printDelegate(frame); |
181 } | 181 } |
182 | 182 |
183 } // namespace blink | 183 } // namespace blink |
OLD | NEW |