OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext(
); | 638 v8::Handle<v8::Context> frameContext = frame->script()->currentWorldContext(
); |
639 v8::Context::Scope contextScope(frameContext); | 639 v8::Context::Scope contextScope(frameContext); |
640 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), isolate); | 640 v8::Handle<v8::Value> overlayHostObj = toV8(m_overlayHost.get(), v8::Handle<
v8::Object>(), isolate); |
641 v8::Handle<v8::Object> global = frameContext->Global(); | 641 v8::Handle<v8::Object> global = frameContext->Global(); |
642 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); | 642 global->Set(v8::String::New("InspectorOverlayHost"), overlayHostObj); |
643 | 643 |
644 #if OS(WIN) | 644 #if OS(WIN) |
645 evaluateInOverlay("setPlatform", "windows"); | 645 evaluateInOverlay("setPlatform", "windows"); |
646 #elif OS(MACOSX) | 646 #elif OS(MACOSX) |
647 evaluateInOverlay("setPlatform", "mac"); | 647 evaluateInOverlay("setPlatform", "mac"); |
648 #elif OS(UNIX) | 648 #elif OS(POSIX) |
649 evaluateInOverlay("setPlatform", "linux"); | 649 evaluateInOverlay("setPlatform", "linux"); |
650 #endif | 650 #endif |
651 | 651 |
652 return m_overlayPage.get(); | 652 return m_overlayPage.get(); |
653 } | 653 } |
654 | 654 |
655 void InspectorOverlay::reset(const IntSize& viewportSize, const IntSize& frameVi
ewFullSize, int scrollX, int scrollY) | 655 void InspectorOverlay::reset(const IntSize& viewportSize, const IntSize& frameVi
ewFullSize, int scrollX, int scrollY) |
656 { | 656 { |
657 RefPtr<JSONObject> resetData = JSONObject::create(); | 657 RefPtr<JSONObject> resetData = JSONObject::create(); |
658 resetData->setNumber("pageScaleFactor", m_page->pageScaleFactor()); | 658 resetData->setNumber("pageScaleFactor", m_page->pageScaleFactor()); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 } | 693 } |
694 | 694 |
695 void InspectorOverlay::freePage() | 695 void InspectorOverlay::freePage() |
696 { | 696 { |
697 m_overlayPage.clear(); | 697 m_overlayPage.clear(); |
698 m_overlayChromeClient.clear(); | 698 m_overlayChromeClient.clear(); |
699 m_timer.stop(); | 699 m_timer.stop(); |
700 } | 700 } |
701 | 701 |
702 } // namespace WebCore | 702 } // namespace WebCore |
OLD | NEW |