Changeset 121895 in webkit


Ignore:
Timestamp:
Jul 5, 2012 2:34:46 AM (12 years ago)
Author:
zandobersek@gmail.com
Message:

Add Gamepad logging channel
https://bugs.webkit.org/show_bug.cgi?id=90570

Reviewed by Carlos Garcia Campos.

Add a new logging channel for logging significant
events that are related to Gamepad API implementation.

No new tests - no new testable functionality.

  • platform/Logging.cpp:

(WebCore):
(WebCore::getChannelFromName):

  • platform/Logging.h:

(WebCore):

  • platform/gtk/GamepadsGtk.cpp: Log when a device is

registered or unregistered.
(WebCore::GamepadsGtk::registerDevice):
(WebCore::GamepadsGtk::unregisterDevice):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121891 r121895  
     12012-07-05  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        Add Gamepad logging channel
     4        https://bugs.webkit.org/show_bug.cgi?id=90570
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Add a new logging channel for logging significant
     9        events that are related to Gamepad API implementation.
     10
     11        No new tests - no new testable functionality.
     12
     13        * platform/Logging.cpp:
     14        (WebCore):
     15        (WebCore::getChannelFromName):
     16        * platform/Logging.h:
     17        (WebCore):
     18        * platform/gtk/GamepadsGtk.cpp: Log when a device is
     19        registered or unregistered.
     20        (WebCore::GamepadsGtk::registerDevice):
     21        (WebCore::GamepadsGtk::unregisterDevice):
     22
    1232012-07-05  Peter Wang  <peter.wang@torchmobile.com.cn>
    224
  • trunk/Source/WebCore/platform/Logging.cpp

    r121707 r121895  
    6666WTFLogChannel LogWebAudio =          { 0x20000000, "WebCoreLogLevel", WTFLogChannelOff };
    6767WTFLogChannel LogCompositing =       { 0x40000000, "WebCoreLogLevel", WTFLogChannelOff };
     68WTFLogChannel LogGamepad =           { 0x80000000, "WebCoreLogLevel", WTFLogChannelOff };
    6869
    6970
     
    148149        return &LogCompositing;
    149150
     151    if (equalIgnoringCase(channelName, String("Gamepad")))
     152        return &LogGamepad;
     153
    150154    return 0;
    151155}
  • trunk/Source/WebCore/platform/Logging.h

    r121707 r121895  
    6464    extern WTFLogChannel LogWebAudio;
    6565    extern WTFLogChannel LogCompositing;
     66    extern WTFLogChannel LogGamepad;
    6667
    6768    void initializeLoggingChannelsIfNecessary();
  • trunk/Source/WebCore/platform/gtk/GamepadsGtk.cpp

    r121797 r121895  
    3131#include "GamepadDeviceLinux.h"
    3232#include "GamepadList.h"
     33#include "Logging.h"
    3334#include <gio/gunixinputstream.h>
    3435#include <gudev/gudev.h>
     
    3738#include <wtf/gobject/GOwnPtr.h>
    3839#include <wtf/gobject/GRefPtr.h>
     40#include <wtf/text/CString.h>
    3941#include <wtf/text/StringHash.h>
    4042
     
    139141void GamepadsGtk::registerDevice(String deviceFile)
    140142{
     143    LOG(Gamepad, "GamepadsGtk::registerDevice %s", deviceFile.ascii().data());
    141144    ASSERT(!m_deviceMap.contains(deviceFile));
    142145
     
    152155void GamepadsGtk::unregisterDevice(String deviceFile)
    153156{
     157    LOG(Gamepad, "GamepadsGtk::unregisterDevice %s", deviceFile.ascii().data());
    154158    ASSERT(m_deviceMap.contains(deviceFile));
    155159
Note: See TracChangeset for help on using the changeset viewer.