OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #include "core/inspector/InspectorFrontendChannel.h" | 99 #include "core/inspector/InspectorFrontendChannel.h" |
100 #include "core/inspector/InspectorInstrumentation.h" | 100 #include "core/inspector/InspectorInstrumentation.h" |
101 #include "core/inspector/InspectorOverlay.h" | 101 #include "core/inspector/InspectorOverlay.h" |
102 #include "core/inspector/InstrumentingAgents.h" | 102 #include "core/inspector/InstrumentingAgents.h" |
103 #include "core/loader/FrameLoader.h" | 103 #include "core/loader/FrameLoader.h" |
104 #include "core/loader/HistoryItem.h" | 104 #include "core/loader/HistoryItem.h" |
105 #include "core/page/Chrome.h" | 105 #include "core/page/Chrome.h" |
106 #include "core/page/ChromeClient.h" | 106 #include "core/page/ChromeClient.h" |
107 #include "core/page/EventHandler.h" | 107 #include "core/page/EventHandler.h" |
108 #include "core/page/FocusController.h" | 108 #include "core/page/FocusController.h" |
| 109 #include "core/page/NetworkStateNotifier.h" |
109 #include "core/page/Page.h" | 110 #include "core/page/Page.h" |
110 #include "core/page/PagePopupController.h" | 111 #include "core/page/PagePopupController.h" |
111 #include "core/page/PrintContext.h" | 112 #include "core/page/PrintContext.h" |
112 #include "core/rendering/RenderLayer.h" | 113 #include "core/rendering/RenderLayer.h" |
113 #include "core/rendering/RenderMenuList.h" | 114 #include "core/rendering/RenderMenuList.h" |
114 #include "core/rendering/RenderObject.h" | 115 #include "core/rendering/RenderObject.h" |
115 #include "core/rendering/RenderTreeAsText.h" | 116 #include "core/rendering/RenderTreeAsText.h" |
116 #include "core/rendering/RenderView.h" | 117 #include "core/rendering/RenderView.h" |
117 #include "core/rendering/compositing/CompositedLayerMapping.h" | 118 #include "core/rendering/compositing/CompositedLayerMapping.h" |
118 #include "core/rendering/compositing/RenderLayerCompositor.h" | 119 #include "core/rendering/compositing/RenderLayerCompositor.h" |
119 #include "core/testing/GCObservation.h" | 120 #include "core/testing/GCObservation.h" |
120 #include "core/workers/WorkerThread.h" | 121 #include "core/workers/WorkerThread.h" |
121 #include "platform/ColorChooser.h" | 122 #include "platform/ColorChooser.h" |
122 #include "platform/Cursor.h" | 123 #include "platform/Cursor.h" |
123 #include "platform/Language.h" | 124 #include "platform/Language.h" |
124 #include "platform/TraceEvent.h" | 125 #include "platform/TraceEvent.h" |
125 #include "platform/geometry/IntRect.h" | 126 #include "platform/geometry/IntRect.h" |
126 #include "platform/geometry/LayoutRect.h" | 127 #include "platform/geometry/LayoutRect.h" |
127 #include "platform/graphics/GraphicsLayer.h" | 128 #include "platform/graphics/GraphicsLayer.h" |
128 #include "platform/graphics/filters/FilterOperation.h" | 129 #include "platform/graphics/filters/FilterOperation.h" |
129 #include "platform/graphics/filters/FilterOperations.h" | 130 #include "platform/graphics/filters/FilterOperations.h" |
130 #include "platform/weborigin/SchemeRegistry.h" | 131 #include "platform/weborigin/SchemeRegistry.h" |
131 #include "public/platform/Platform.h" | 132 #include "public/platform/Platform.h" |
| 133 #include "public/platform/WebConnectionType.h" |
132 #include "public/platform/WebGraphicsContext3D.h" | 134 #include "public/platform/WebGraphicsContext3D.h" |
133 #include "public/platform/WebGraphicsContext3DProvider.h" | 135 #include "public/platform/WebGraphicsContext3DProvider.h" |
134 #include "public/platform/WebLayer.h" | 136 #include "public/platform/WebLayer.h" |
135 #include "wtf/InstanceCounter.h" | 137 #include "wtf/InstanceCounter.h" |
136 #include "wtf/PassOwnPtr.h" | 138 #include "wtf/PassOwnPtr.h" |
137 #include "wtf/dtoa.h" | 139 #include "wtf/dtoa.h" |
138 #include "wtf/text/StringBuffer.h" | 140 #include "wtf/text/StringBuffer.h" |
139 | 141 |
140 namespace WebCore { | 142 namespace WebCore { |
141 | 143 |
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2333 blink::WebPoint point(x, y); | 2335 blink::WebPoint point(x, y); |
2334 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); | 2336 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); |
2335 return surroundingText.content(); | 2337 return surroundingText.content(); |
2336 } | 2338 } |
2337 | 2339 |
2338 void Internals::setFocused(bool focused) | 2340 void Internals::setFocused(bool focused) |
2339 { | 2341 { |
2340 frame()->page()->focusController().setFocused(focused); | 2342 frame()->page()->focusController().setFocused(focused); |
2341 } | 2343 } |
2342 | 2344 |
| 2345 void Internals::setNetworkConnectionInfo(const String& type, ExceptionState& exc
eptionState) |
| 2346 { |
| 2347 blink::WebConnectionType webtype; |
| 2348 if (type == "cellular") { |
| 2349 webtype = blink::ConnectionTypeCellular; |
| 2350 } else if (type == "bluetooth") { |
| 2351 webtype = blink::ConnectionTypeBluetooth; |
| 2352 } else if (type == "ethernet") { |
| 2353 webtype = blink::ConnectionTypeEthernet; |
| 2354 } else if (type == "wifi") { |
| 2355 webtype = blink::ConnectionTypeWifi; |
| 2356 } else if (type == "other") { |
| 2357 webtype = blink::ConnectionTypeOther; |
| 2358 } else if (type == "none") { |
| 2359 webtype = blink::ConnectionTypeNone; |
| 2360 } else { |
| 2361 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); |
| 2362 return; |
| 2363 } |
| 2364 networkStateNotifier().setWebConnectionType(webtype); |
2343 } | 2365 } |
| 2366 |
| 2367 } // namespace WebCore |
OLD | NEW |