OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } | 317 } |
318 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { | 318 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { |
319 PlatformKeyboardEvent keyboardEvent = PlatformKeyboardEventBuilder(*stat
ic_cast<const WebKeyboardEvent*>(&inputEvent)); | 319 PlatformKeyboardEvent keyboardEvent = PlatformKeyboardEventBuilder(*stat
ic_cast<const WebKeyboardEvent*>(&inputEvent)); |
320 return ic->handleKeyboardEvent(page->mainFrame(), keyboardEvent); | 320 return ic->handleKeyboardEvent(page->mainFrame(), keyboardEvent); |
321 } | 321 } |
322 return false; | 322 return false; |
323 } | 323 } |
324 | 324 |
325 void WebDevToolsAgentImpl::overrideDeviceMetrics(int width, int height, float de
viceScaleFactor, bool emulateViewport, bool fitWindow) | 325 void WebDevToolsAgentImpl::overrideDeviceMetrics(int width, int height, float de
viceScaleFactor, bool emulateViewport, bool fitWindow) |
326 { | 326 { |
327 if (!width && !height) { | 327 if (!width && !height && !deviceScaleFactor) { |
328 if (m_deviceMetricsEnabled) { | 328 if (m_deviceMetricsEnabled) { |
329 m_deviceMetricsEnabled = false; | 329 m_deviceMetricsEnabled = false; |
330 m_webViewImpl->setBackgroundColorOverride(Color::transparent); | 330 m_webViewImpl->setBackgroundColorOverride(Color::transparent); |
331 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_isOverlayScrol
lbarsEnabled); | 331 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_isOverlayScrol
lbarsEnabled); |
332 disableViewportEmulation(); | 332 disableViewportEmulation(); |
333 m_client->disableDeviceEmulation(); | 333 m_client->disableDeviceEmulation(); |
334 } | 334 } |
335 } else { | 335 } else { |
336 if (!m_deviceMetricsEnabled) { | 336 if (!m_deviceMetricsEnabled) { |
337 m_deviceMetricsEnabled = true; | 337 m_deviceMetricsEnabled = true; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kProfiler_startCmd) | 664 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kProfiler_startCmd) |
665 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kProfiler_stopCmd); | 665 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke
ndDispatcher::kProfiler_stopCmd); |
666 } | 666 } |
667 | 667 |
668 void WebDevToolsAgent::processPendingMessages() | 668 void WebDevToolsAgent::processPendingMessages() |
669 { | 669 { |
670 PageScriptDebugServer::shared().runPendingTasks(); | 670 PageScriptDebugServer::shared().runPendingTasks(); |
671 } | 671 } |
672 | 672 |
673 } // namespace blink | 673 } // namespace blink |
OLD | NEW |