Changeset 91255 in webkit


Ignore:
Timestamp:
Jul 19, 2011 8:26:16 AM (13 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

[EFL] Add ewk_network.cpp|h files.
https://bugs.webkit.org/show_bug.cgi?id=63315

Source/WebCore:

Enable setOnLine(bool) on EFL port as well as Android and Chromium.

Reviewed by Antonio Gomes.

  • platform/network/NetworkStateNotifier.cpp:
  • platform/network/NetworkStateNotifier.h:

Source/WebKit/efl:

ewk_network.cpp|h files are added to ewk in order to support APIs related to networking.
In addition, ewk_network_state_notifier_online_set() is added to ewk_network.cpp in order
to notify NetworkStateNotifier of network status.

Reviewed by Antonio Gomes.

  • CMakeListsEfl.txt:
  • ewk/EWebKit.h:
  • ewk/ewk_network.cpp: Added.

(ewk_network_proxy_uri_set):
(ewk_network_proxy_uri_get):
(ewk_network_state_notifier_online_set):

  • ewk/ewk_network.h:
  • ewk/ewk_settings.cpp:
  • ewk/ewk_settings.h:
Location:
trunk
Files:
1 added
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91252 r91255  
     12011-07-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        [EFL] Add ewk_network.cpp|h files.
     4        https://bugs.webkit.org/show_bug.cgi?id=63315
     5
     6        Enable setOnLine(bool) on EFL port as well as Android and Chromium.
     7
     8        Reviewed by Antonio Gomes.
     9
     10        * platform/network/NetworkStateNotifier.cpp:
     11        * platform/network/NetworkStateNotifier.h:
     12
    1132011-07-19  Ilya Tikhonovsky  <loislo@chromium.org>
    214
  • trunk/Source/WebCore/platform/network/NetworkStateNotifier.cpp

    r79563 r91255  
    4747}
    4848
    49 #if PLATFORM(ANDROID) || PLATFORM(CHROMIUM)
     49#if PLATFORM(ANDROID) || PLATFORM(CHROMIUM) || PLATFORM(EFL)
    5050void NetworkStateNotifier::setOnLine(bool onLine)
    5151{
  • trunk/Source/WebCore/platform/network/NetworkStateNotifier.h

    r85323 r91255  
    6969#if (PLATFORM(QT) && USE(QT_BEARER))
    7070    void setNetworkAccessAllowed(bool);
    71 #elif PLATFORM(ANDROID) || PLATFORM(CHROMIUM)
     71#elif PLATFORM(ANDROID) || PLATFORM(CHROMIUM) || PLATFORM(EFL)
    7272    void setOnLine(bool);
    7373#endif
  • trunk/Source/WebKit/efl/CMakeListsEfl.txt

    r89818 r91255  
    6464    efl/ewk/ewk_history.cpp
    6565    efl/ewk/ewk_main.cpp
     66    efl/ewk/ewk_network.cpp
    6667    efl/ewk/ewk_settings.cpp
    6768    efl/ewk/ewk_tiled_backing_store.c
  • trunk/Source/WebKit/efl/ChangeLog

    r91097 r91255  
     12011-07-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        [EFL] Add ewk_network.cpp|h files.
     4        https://bugs.webkit.org/show_bug.cgi?id=63315
     5
     6        ewk_network.cpp|h files are added to ewk in order to support APIs related to networking.
     7        In addition, ewk_network_state_notifier_online_set() is added to ewk_network.cpp in order
     8        to notify NetworkStateNotifier of network status.
     9
     10        Reviewed by Antonio Gomes.
     11
     12        * CMakeListsEfl.txt:
     13        * ewk/EWebKit.h:
     14        * ewk/ewk_network.cpp: Added.
     15        (ewk_network_proxy_uri_set):
     16        (ewk_network_proxy_uri_get):
     17        (ewk_network_state_notifier_online_set):
     18        * ewk/ewk_network.h:
     19        * ewk/ewk_settings.cpp:
     20        * ewk/ewk_settings.h:
     21
    1222011-07-15  Dan Bernstein  <mitz@apple.com>
    223
  • trunk/Source/WebKit/efl/ewk/EWebKit.h

    r89664 r91255  
    3636#include "ewk_history.h"
    3737#include "ewk_main.h"
     38#include "ewk_network.h"
    3839#include "ewk_settings.h"
    3940#include "ewk_view.h"
  • trunk/Source/WebKit/efl/ewk/ewk_network.h

    r91253 r91255  
    11/*
    2     Copyright (C) 2008-2009 INdT - Instituto Nokia de Tecnologia
    3     Copyright (C) 2009-2010 ProFUSION embedded systems
    4     Copyright (C) 2009-2010 Samsung Electronics
     2    Copyright (C) 2011 Samsung Electronics
    53
    64    This library is free software; you can redistribute it and/or
     
    2119
    2220/**
    23  * @file    EWebKit.h
    24  * @brief   Contains the header files that are required by WebKit-EFL.
    25  *
    26  * It includes the all header files that are exported to public API and Evas header.
     21 * @file    ewk_network.h
     22 * @brief   Describes the network API.
    2723 */
    2824
    29 #ifndef EWebKit_h
    30 #define EWebKit_h
     25#ifndef ewk_network_h
     26#define ewk_network_h
    3127
    32 #include "ewk_auth.h"
    33 #include "ewk_contextmenu.h"
    34 #include "ewk_cookies.h"
    35 #include "ewk_frame.h"
    36 #include "ewk_history.h"
    37 #include "ewk_main.h"
    38 #include "ewk_settings.h"
    39 #include "ewk_view.h"
    40 #include "ewk_window_features.h"
     28#include <Eina.h>
    4129
    42 #include <Evas.h>
     30#ifdef __cplusplus
     31extern "C" {
     32#endif
    4333
    44 #endif // EWebKit_h
     34EAPI void             ewk_network_proxy_uri_set(const char* proxy);
     35EAPI const char*      ewk_network_proxy_uri_get(void);
     36
     37EAPI void             ewk_network_state_notifier_online_set(Eina_Bool online);
     38
     39#ifdef __cplusplus
     40}
     41#endif
     42#endif // ewk_network_h
  • trunk/Source/WebKit/efl/ewk/ewk_settings.cpp

    r91051 r91255  
    4444#include <wtf/text/CString.h>
    4545#include <wtf/text/StringConcatenate.h>
    46 
    47 #if USE(SOUP)
    48 #include "ResourceHandle.h"
    49 #include <libsoup/soup.h>
    50 #endif
    5146
    5247#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     
    293288
    294289/**
    295  * Sets the given proxy URI to network backend.
    296  *
    297  * @param proxy URI to set
    298  */
    299 void ewk_settings_proxy_uri_set(const char* proxy)
    300 {
    301 #if USE(SOUP)
    302     SoupSession* session = WebCore::ResourceHandle::defaultSession();
    303 
    304     if (!proxy) {
    305         ERR("no proxy uri. remove proxy feature in soup.");
    306         soup_session_remove_feature_by_type(session, SOUP_TYPE_PROXY_RESOLVER);
    307         return;
    308     }
    309 
    310     SoupURI* uri = soup_uri_new(proxy);
    311     EINA_SAFETY_ON_NULL_RETURN(uri);
    312 
    313     g_object_set(session, SOUP_SESSION_PROXY_URI, uri, NULL);
    314     soup_uri_free(uri);
    315 #elif USE(CURL)
    316     EINA_SAFETY_ON_TRUE_RETURN(1);
    317 #endif
    318 }
    319 
    320 /**
    321  * Gets the proxy URI from the network backend.
    322  *
    323  * @return current proxy URI or @c 0 if it's not set
    324  */
    325 const char* ewk_settings_proxy_uri_get(void)
    326 {
    327 #if USE(SOUP)
    328     SoupURI* uri;
    329     SoupSession* session = WebCore::ResourceHandle::defaultSession();
    330     g_object_get(session, SOUP_SESSION_PROXY_URI, &uri, NULL);
    331 
    332     if (!uri) {
    333         ERR("no proxy uri");
    334         return 0;
    335     }
    336 
    337     WTF::String proxy = soup_uri_to_string(uri, EINA_FALSE);
    338     return eina_stringshare_add(proxy.utf8().data());
    339 #elif USE(CURL)
    340     EINA_SAFETY_ON_TRUE_RETURN_VAL(1, 0);
    341 #endif
    342 }
    343 
    344 /**
    345290 * Gets status of the memory cache of WebCore.
    346291 *
  • trunk/Source/WebKit/efl/ewk/ewk_settings.h

    r88533 r91255  
    5050EAPI const char      *ewk_settings_cache_directory_path_get(void);
    5151
    52 EAPI void             ewk_settings_proxy_uri_set(const char* proxy);
    53 EAPI const char*      ewk_settings_proxy_uri_get(void);
    54 
    5552EAPI Eina_Bool        ewk_settings_cache_enable_get(void);
    5653EAPI void             ewk_settings_cache_enable_set(Eina_Bool set);
  • trunk/Tools/EWebLauncher/main.c

    r88714 r91255  
    899899    proxyUri = getenv("http_proxy");
    900900    if (proxyUri)
    901         ewk_settings_proxy_uri_set(proxyUri);
     901        ewk_network_proxy_uri_set(proxyUri);
    902902
    903903    browserCreate(url, themePath, userAgent, geometry, engine, backingStore, isFlattening, isFullscreen, path);
Note: See TracChangeset for help on using the changeset viewer.