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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #include "core/platform/graphics/IntRect.h" | 96 #include "core/platform/graphics/IntRect.h" |
97 #include "core/rendering/RenderMenuList.h" | 97 #include "core/rendering/RenderMenuList.h" |
98 #include "core/rendering/RenderObject.h" | 98 #include "core/rendering/RenderObject.h" |
99 #include "core/rendering/RenderTreeAsText.h" | 99 #include "core/rendering/RenderTreeAsText.h" |
100 #include "core/rendering/RenderView.h" | 100 #include "core/rendering/RenderView.h" |
101 #include "core/workers/WorkerThread.h" | 101 #include "core/workers/WorkerThread.h" |
102 #include "weborigin/SchemeRegistry.h" | 102 #include "weborigin/SchemeRegistry.h" |
103 #include "wtf/dtoa.h" | 103 #include "wtf/dtoa.h" |
104 #include "wtf/text/StringBuffer.h" | 104 #include "wtf/text/StringBuffer.h" |
105 | 105 |
106 #if ENABLE(BATTERY_STATUS) | |
107 #include "modules/battery/BatteryController.h" | |
108 #endif | |
109 | |
110 #include "core/page/PagePopupController.h" | 106 #include "core/page/PagePopupController.h" |
111 #include "core/platform/graphics/GraphicsLayer.h" | 107 #include "core/platform/graphics/GraphicsLayer.h" |
112 #include "core/platform/graphics/filters/FilterOperation.h" | 108 #include "core/platform/graphics/filters/FilterOperation.h" |
113 #include "core/platform/graphics/filters/FilterOperations.h" | 109 #include "core/platform/graphics/filters/FilterOperations.h" |
114 #include "core/rendering/RenderLayerBacking.h" | 110 #include "core/rendering/RenderLayerBacking.h" |
115 | 111 |
116 #if ENABLE(ENCRYPTED_MEDIA_V2) | 112 #if ENABLE(ENCRYPTED_MEDIA_V2) |
117 #include "core/testing/MockCDM.h" | 113 #include "core/testing/MockCDM.h" |
118 #include "modules/encryptedmedia/CDM.h" | 114 #include "modules/encryptedmedia/CDM.h" |
119 #endif | 115 #endif |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 InspectorController* inspectorController = contextDocument()->frame()->page(
)->inspectorController(); | 1306 InspectorController* inspectorController = contextDocument()->frame()->page(
)->inspectorController(); |
1311 inspectorController->didBeginFrame(); | 1307 inspectorController->didBeginFrame(); |
1312 } | 1308 } |
1313 | 1309 |
1314 void Internals::emitInspectorDidCancelFrame() | 1310 void Internals::emitInspectorDidCancelFrame() |
1315 { | 1311 { |
1316 InspectorController* inspectorController = contextDocument()->frame()->page(
)->inspectorController(); | 1312 InspectorController* inspectorController = contextDocument()->frame()->page(
)->inspectorController(); |
1317 inspectorController->didCancelFrame(); | 1313 inspectorController->didCancelFrame(); |
1318 } | 1314 } |
1319 | 1315 |
1320 void Internals::setBatteryStatus(Document* document, const String& eventType, bo
ol charging, double chargingTime, double dischargingTime, double level, Exceptio
nCode& ec) | |
1321 { | |
1322 if (!document || !document->page()) { | |
1323 ec = INVALID_ACCESS_ERR; | |
1324 return; | |
1325 } | |
1326 | |
1327 #if ENABLE(BATTERY_STATUS) | |
1328 BatteryController::from(document->page())->didChangeBatteryStatus(eventType,
BatteryStatus::create(charging, chargingTime, dischargingTime, level)); | |
1329 #else | |
1330 UNUSED_PARAM(eventType); | |
1331 UNUSED_PARAM(charging); | |
1332 UNUSED_PARAM(chargingTime); | |
1333 UNUSED_PARAM(dischargingTime); | |
1334 UNUSED_PARAM(level); | |
1335 #endif | |
1336 } | |
1337 | |
1338 bool Internals::hasSpellingMarker(Document* document, int from, int length, Exce
ptionCode&) | 1316 bool Internals::hasSpellingMarker(Document* document, int from, int length, Exce
ptionCode&) |
1339 { | 1317 { |
1340 if (!document || !document->frame()) | 1318 if (!document || !document->frame()) |
1341 return 0; | 1319 return 0; |
1342 | 1320 |
1343 return document->frame()->editor()->selectionStartHasMarkerFor(DocumentMarke
r::Spelling, from, length); | 1321 return document->frame()->editor()->selectionStartHasMarkerFor(DocumentMarke
r::Spelling, from, length); |
1344 } | 1322 } |
1345 | 1323 |
1346 void Internals::setContinuousSpellCheckingEnabled(bool enabled, ExceptionCode&) | 1324 void Internals::setContinuousSpellCheckingEnabled(bool enabled, ExceptionCode&) |
1347 { | 1325 { |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 | 1929 |
1952 RenderObject* renderer = select->renderer(); | 1930 RenderObject* renderer = select->renderer(); |
1953 if (!renderer->isMenuList()) | 1931 if (!renderer->isMenuList()) |
1954 return false; | 1932 return false; |
1955 | 1933 |
1956 RenderMenuList* menuList = toRenderMenuList(renderer); | 1934 RenderMenuList* menuList = toRenderMenuList(renderer); |
1957 return menuList->popupIsVisible(); | 1935 return menuList->popupIsVisible(); |
1958 } | 1936 } |
1959 | 1937 |
1960 } | 1938 } |
OLD | NEW |