Bug 69092 - Web Inspector: [chromium] expose inspector protocol version to the embedder.
Summary: Web Inspector: [chromium] expose inspector protocol version to the embedder.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 10:00 PDT by Pavel Feldman
Modified: 2011-09-30 03:43 PDT (History)
3 users (show)

See Also:


Attachments
Patch (13.04 KB, patch)
2011-09-29 10:08 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (263.59 KB, patch)
2011-09-30 02:36 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2011-09-29 10:00:48 PDT
Patch to follow.
Comment 1 Pavel Feldman 2011-09-29 10:03:32 PDT
Please find generated file content below:

======================================
#ifndef InspectorProtocolVersion_h
#define InspectorProtocolVersion_h

#include "PlatformString.h"

namespace WebCore {

String inspectorProtocolVersion()
{
    return "tip-of-tree";
}

bool supportsInspectorProtocolVersion(const String& version)
{
    if (version == "draft-01")
        return true;
    if (version == "tip-of-tree")
        return true;
    return false;
}

}

#endif // !defined(InspectorProtocolVersion_h)
======================================
Comment 2 Pavel Feldman 2011-09-29 10:08:28 PDT
Created attachment 109171 [details]
Patch
Comment 3 Pavel Feldman 2011-09-30 02:36:53 PDT
Created attachment 109270 [details]
Patch
Comment 4 Pavel Feldman 2011-09-30 03:27:58 PDT
==============================================
#ifndef InspectorProtocolVersion_h
#define InspectorProtocolVersion_h
#include "PlatformString.h"
#include <wtf/Vector.h>

namespace WebCore {

String inspectorProtocolVersion() { return "0.1"; }

int inspectorProtocolVersionMajor() { return 0; }

int inspectorProtocolVersionMinor() { return 1; }

bool supportsInspectorProtocolVersion(const String& version)
{
    Vector<String> tokens;
    version.split(".", tokens);
    if (tokens.size() != 2)
        return false;

    bool ok = true;
    int major = tokens[0].toInt(&ok);
    if (!ok || major != 0)
        return false;

    int minor = tokens[1].toInt(&ok);
    if (!ok || minor < 1)
        return false;

    return true;
}

}

#endif // !defined(InspectorProtocolVersion_h)
==============================================
Comment 5 Pavel Feldman 2011-09-30 03:43:55 PDT
Committed r96398: <http://trac.webkit.org/changeset/96398>