mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Create 2272 release branch for CEF3.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2272@1993 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
69
libcef/browser/navigation_entry_impl.cc
Normal file
69
libcef/browser/navigation_entry_impl.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "libcef/browser/navigation_entry_impl.h"
|
||||
|
||||
#include "libcef/common/time_util.h"
|
||||
|
||||
#include "content/public/browser/navigation_entry.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
CefNavigationEntryImpl::CefNavigationEntryImpl(content::NavigationEntry* value)
|
||||
: CefValueBase<CefNavigationEntry, content::NavigationEntry>(
|
||||
value, NULL, kOwnerNoDelete, true,
|
||||
new CefValueControllerNonThreadSafe()) {
|
||||
// Indicate that this object owns the controller.
|
||||
SetOwnsController();
|
||||
}
|
||||
|
||||
bool CefNavigationEntryImpl::IsValid() {
|
||||
return !detached();
|
||||
}
|
||||
|
||||
CefString CefNavigationEntryImpl::GetURL() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetURL().spec();
|
||||
}
|
||||
|
||||
CefString CefNavigationEntryImpl::GetDisplayURL() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetVirtualURL().spec();
|
||||
}
|
||||
|
||||
CefString CefNavigationEntryImpl::GetOriginalURL() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetUserTypedURL().spec();
|
||||
}
|
||||
|
||||
CefString CefNavigationEntryImpl::GetTitle() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetTitle();
|
||||
}
|
||||
|
||||
CefNavigationEntry::TransitionType CefNavigationEntryImpl::GetTransitionType() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, TT_EXPLICIT);
|
||||
return static_cast<TransitionType>(const_value().GetTransitionType());
|
||||
}
|
||||
|
||||
bool CefNavigationEntryImpl::HasPostData() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, false);
|
||||
return const_value().GetHasPostData();
|
||||
}
|
||||
|
||||
CefString CefNavigationEntryImpl::GetFrameName() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetFrameToNavigate();
|
||||
}
|
||||
|
||||
CefTime CefNavigationEntryImpl::GetCompletionTime() {
|
||||
CefTime time;
|
||||
CEF_VALUE_VERIFY_RETURN(false, time);
|
||||
cef_time_from_basetime(const_value().GetTimestamp(), time);
|
||||
return time;
|
||||
}
|
||||
|
||||
int CefNavigationEntryImpl::GetHttpStatusCode() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
return const_value().GetHttpStatusCode();
|
||||
}
|
Reference in New Issue
Block a user