Add support for DevTools inspect element via a new |inspect_element_at| parameter added to CefBrowserHost::ShowDevTools (issue #586).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1870 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-10-11 00:12:01 +00:00
parent 5c1f3e4ffa
commit d15f6abc3a
15 changed files with 113 additions and 27 deletions

View File

@@ -1102,6 +1102,14 @@ typedef enum {
UR_FAILED,
} cef_urlrequest_status_t;
///
// Structure representing a point.
///
typedef struct _cef_point_t {
int x;
int y;
} cef_point_t;
///
// Structure representing a rectangle.
///

View File

@@ -134,6 +134,47 @@ class CefStructBase : public traits::struct_type {
};
struct CefPointTraits {
typedef cef_point_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {}
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
*target = *src;
}
};
///
// Class representing a point.
///
class CefPoint : public CefStructBase<CefPointTraits> {
public:
typedef CefStructBase<CefPointTraits> parent;
CefPoint() : parent() {}
CefPoint(const cef_point_t& r) : parent(r) {} // NOLINT(runtime/explicit)
CefPoint(const CefPoint& r) : parent(r) {} // NOLINT(runtime/explicit)
CefPoint(int x, int y) : parent() {
Set(x, y);
}
bool IsEmpty() const { return x <= 0 || x <= 0; }
void Set(int x, int y) {
this->x = x, this->y = y;
}
};
inline bool operator==(const CefPoint& a, const CefPoint& b) {
return a.x == b.x && a.y == b.y;
}
inline bool operator!=(const CefPoint& a, const CefPoint& b) {
return !(a == b);
}
struct CefRectTraits {
typedef cef_rect_t struct_type;