mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 213078.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1338 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -14,31 +14,43 @@ MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "bindings/v8/ScriptController.h"
|
||||
#include "core/history/BackForwardController.h"
|
||||
#include "core/page/Page.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/src/WebViewImpl.h"
|
||||
#include "third_party/WebKit/Source/web/WebFrameImpl.h"
|
||||
#include "third_party/WebKit/Source/web/WebViewImpl.h"
|
||||
MSVC_POP_WARNING();
|
||||
#undef LOG
|
||||
|
||||
namespace webkit_glue {
|
||||
|
||||
bool CanGoBackOrForward(WebKit::WebView* view, int distance) {
|
||||
bool CanGoBack(WebKit::WebView* view) {
|
||||
if (!view)
|
||||
return false;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
if (distance == 0)
|
||||
return true;
|
||||
if (distance > 0 && distance <= impl->page()->backForward()->forwardCount())
|
||||
return true;
|
||||
if (distance < 0 && -distance <= impl->page()->backForward()->backCount())
|
||||
return true;
|
||||
return false;
|
||||
return (impl->page()->backForward()->backCount() > 0);
|
||||
}
|
||||
|
||||
void GoBackOrForward(WebKit::WebView* view, int distance) {
|
||||
bool CanGoForward(WebKit::WebView* view) {
|
||||
if (!view)
|
||||
return false;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
return (impl->page()->backForward()->forwardCount() > 0);
|
||||
}
|
||||
|
||||
void GoBack(WebKit::WebView* view) {
|
||||
if (!view)
|
||||
return;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
impl->page()->goBackOrForward(distance);
|
||||
WebCore::BackForwardController* controller = impl->page()->backForward();
|
||||
if (controller->backCount() > 0)
|
||||
controller->goBack();
|
||||
}
|
||||
|
||||
void GoForward(WebKit::WebView* view) {
|
||||
if (!view)
|
||||
return;
|
||||
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
|
||||
WebCore::BackForwardController* controller = impl->page()->backForward();
|
||||
if (controller->forwardCount() > 0)
|
||||
controller->goForward();
|
||||
}
|
||||
|
||||
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) {
|
||||
|
Reference in New Issue
Block a user