Changeset 108961 in webkit


Ignore:
Timestamp:
Feb 26, 2012 11:47:48 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][WK2] Add InjectedBundleEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=75463

Patch by YoungTaeck Song <youngtaeck.song@samsung.com> on 2012-02-26
Reviewed by Andreas Kling.

Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:

(WebKit::InjectedBundle::load):
(WebKit::InjectedBundle::activateMacFontAscentHack):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r108959 r108961  
     12012-02-26  YoungTaeck Song  <youngtaeck.song@samsung.com>
     2
     3        [EFL][WK2] Add InjectedBundleEfl.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=75463
     5
     6        Reviewed by Andreas Kling.
     7
     8        Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack().
     9
     10        * WebProcess/InjectedBundle/InjectedBundle.h:
     11        * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
     12        (WebKit::InjectedBundle::load):
     13        (WebKit::InjectedBundle::activateMacFontAscentHack):
     14
    1152012-02-26  Shinya Kawanaka  <shinyak@chromium.org>
    216
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r106005 r108961  
    4444#endif
    4545
     46#if PLATFORM(EFL)
     47#include <Eina.h>
     48#endif
     49
    4650namespace CoreIPC {
    4751    class ArgumentDecoder;
     
    6064#elif PLATFORM(GTK)
    6165typedef ::GModule* PlatformBundle;
     66#elif PLATFORM(EFL)
     67typedef Eina_Module* PlatformBundle;
    6268#endif
    6369
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp

    r95901 r108961  
    2929#include "WKBundleAPICast.h"
    3030#include "WKBundleInitialize.h"
    31 #include <WebCore/NotImplemented.h>
     31#include <wtf/text/CString.h>
    3232
    3333using namespace WebCore;
     
    3535namespace WebKit {
    3636
    37 bool InjectedBundle::load(APIObject*)
     37bool InjectedBundle::load(APIObject* initializationUserData)
    3838{
    39     return false;
     39    m_platformBundle = eina_module_new(m_path.utf8().data());
     40    if (!m_platformBundle) {
     41        EINA_LOG_CRIT("Error loading the injected bundle: eina_module_new() failed");
     42        return false;
     43    }
     44    if (!eina_module_load(m_platformBundle)) {
     45        EINA_LOG_CRIT("Error loading the injected bundle: %s", m_path.utf8().data());
     46        eina_module_free(m_platformBundle);
     47        m_platformBundle = 0;
     48        return false;
     49    }
     50
     51    WKBundleInitializeFunctionPtr initializeFunction = reinterpret_cast<WKBundleInitializeFunctionPtr>(eina_module_symbol_get(m_platformBundle, "WKBundleInitialize"));
     52    if (!initializeFunction) {
     53        EINA_LOG_CRIT("Error loading WKBundleInitialize symbol from injected bundle.");
     54        return false;
     55    }
     56
     57    initializeFunction(toAPI(this), toAPI(initializationUserData));
     58    return true;
    4059}
    4160
    4261void InjectedBundle::activateMacFontAscentHack()
    4362{
    44     notImplemented();
    4563}
    4664
Note: See TracChangeset for help on using the changeset viewer.