mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Introduce the use of Chromium types (issue #1336).
- Move include/cef_build.h to include/base/cef_build.h. - Move libcef_dll/cef_macros.h to include/base/cef_macros.h. - Move include/cef_trace_event.h to include/base/cef_trace_event.h and include/internal/cef_trace_event_internal.h. - Remove the "CEF_" prefix from TRACE macros. - Add new include/base/cef_logging.h and include/internal/cef_logging_internal.h for logging support. - Add new include/wrapper/cef_helpers.h for CEF_REQUIRE_*_THREAD macros and CefScopedArgArray. - Delete the util.h headers used by tests that duplicated the above functionality. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1767 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "cefclient/util.h"
|
||||
#include "include/wrapper/cef_helpers.h"
|
||||
|
||||
namespace dom_test {
|
||||
|
||||
@@ -25,12 +25,12 @@ class ClientDOMEventListener : public CefDOMEventListener {
|
||||
|
||||
virtual void HandleEvent(CefRefPtr<CefDOMEvent> event) OVERRIDE {
|
||||
CefRefPtr<CefDOMDocument> document = event->GetDocument();
|
||||
ASSERT(document.get());
|
||||
DCHECK(document.get());
|
||||
|
||||
std::stringstream ss;
|
||||
|
||||
CefRefPtr<CefDOMNode> button = event->GetTarget();
|
||||
ASSERT(button.get());
|
||||
DCHECK(button.get());
|
||||
std::string buttonValue = button->GetElementAttribute("value");
|
||||
ss << "You clicked the " << buttonValue.c_str() << " button. ";
|
||||
|
||||
@@ -71,10 +71,10 @@ class ClientDOMEventListener : public CefDOMEventListener {
|
||||
|
||||
// Update the description.
|
||||
CefRefPtr<CefDOMNode> desc = document->GetElementById("description");
|
||||
ASSERT(desc.get());
|
||||
DCHECK(desc.get());
|
||||
CefRefPtr<CefDOMNode> text = desc->GetFirstChild();
|
||||
ASSERT(text.get());
|
||||
ASSERT(text->IsText());
|
||||
DCHECK(text.get());
|
||||
DCHECK(text->IsText());
|
||||
text->SetValue(ss.str());
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class ClientDOMVisitor : public CefDOMVisitor {
|
||||
virtual void Visit(CefRefPtr<CefDOMDocument> document) OVERRIDE {
|
||||
// Register a click listener for the button.
|
||||
CefRefPtr<CefDOMNode> button = document->GetElementById("button");
|
||||
ASSERT(button.get());
|
||||
DCHECK(button.get());
|
||||
button->AddEventListener("click", new ClientDOMEventListener(), false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user