Update to Chromium revision 217791.

- Pass popup window attributes to CefLifeSpanHandler::OnBeforePopup (issue #520).
- Windows: Add manifest files for all binary targets and include compatibility manifest in *.exe targets.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1367 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-08-15 19:38:55 +00:00
parent 0a452addf0
commit cdd7333b76
22 changed files with 188 additions and 67 deletions

View File

@@ -171,6 +171,12 @@ class CefBrowserContext::CefResourceContext : public content::ResourceContext {
CHECK(getter_);
return getter_->GetURLRequestContext();
}
virtual bool AllowMicAccess(const GURL& origin) OVERRIDE {
return true;
}
virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE {
return true;
}
void set_url_request_context_getter(CefURLRequestContextGetter* getter) {
getter_ = getter;

View File

@@ -1646,13 +1646,12 @@ bool CefBrowserHostImpl::CanDragEnter(
bool CefBrowserHostImpl::ShouldCreateWebContents(
content::WebContents* web_contents,
int route_id,
WindowContainerType window_container_type,
const string16& frame_name,
const GURL& target_url,
WindowOpenDisposition disposition,
const WebKit::WebWindowFeatures& features,
bool user_gesture) {
int route_id,
WindowContainerType window_container_type,
const string16& frame_name,
const GURL& target_url,
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace) {
CefContentBrowserClient::Get()->GetOrCreateBrowserInfo(
web_contents->GetRenderProcessHost()->GetID(), route_id);
@@ -2286,7 +2285,7 @@ void CefBrowserHostImpl::RunFileChooserOnUIThread(
return;
}
if (params.mode == content::FileChooserParams::OpenFolder) {
if (params.mode == content::FileChooserParams::UploadFolder) {
NOTIMPLEMENTED();
callback.Run(std::vector<base::FilePath>());
return;

View File

@@ -312,9 +312,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
WindowContainerType window_container_type,
const string16& frame_name,
const GURL& target_url,
WindowOpenDisposition disposition,
const WebKit::WebWindowFeatures& features,
bool user_gesture) OVERRIDE;
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace) OVERRIDE;
virtual void WebContentsCreated(content::WebContents* source_contents,
int64 source_frame_id,
const string16& frame_name,

View File

@@ -38,6 +38,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/common/content_switches.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#include "ui/base/ui_base_switches.h"
#include "url/gurl.h"
@@ -244,6 +245,37 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
}
};
void TranslatePopupFeatures(const WebKit::WebWindowFeatures& webKitFeatures,
CefPopupFeatures& features) {
features.x = static_cast<int>(webKitFeatures.x);
features.xSet = webKitFeatures.xSet;
features.y = static_cast<int>(webKitFeatures.y);
features.ySet = webKitFeatures.ySet;
features.width = static_cast<int>(webKitFeatures.width);
features.widthSet = webKitFeatures.widthSet;
features.height = static_cast<int>(webKitFeatures.height);
features.heightSet = webKitFeatures.heightSet;
features.menuBarVisible = webKitFeatures.menuBarVisible;
features.statusBarVisible = webKitFeatures.statusBarVisible;
features.toolBarVisible = webKitFeatures.toolBarVisible;
features.locationBarVisible = webKitFeatures.locationBarVisible;
features.scrollbarsVisible = webKitFeatures.scrollbarsVisible;
features.resizable = webKitFeatures.resizable;
features.fullscreen = webKitFeatures.fullscreen;
features.dialog = webKitFeatures.dialog;
features.additionalFeatures = NULL;
if (webKitFeatures.additionalFeatures.size() > 0)
features.additionalFeatures = cef_string_list_alloc();
CefString str;
for (unsigned int i = 0; i < webKitFeatures.additionalFeatures.size(); ++i) {
str = string16(webKitFeatures.additionalFeatures[i]);
cef_string_list_append(features.additionalFeatures, str.GetStruct());
}
}
} // namespace
@@ -557,10 +589,18 @@ content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() {
bool CefContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& origin,
const GURL& source_origin,
WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
WindowOpenDisposition disposition,
const WebKit::WebWindowFeatures& features,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
int render_process_id,
bool is_guest,
int opener_id,
bool* no_javascript_access) {
CEF_REQUIRE_IOT();
*no_javascript_access = false;
@@ -599,27 +639,26 @@ bool CefContentBrowserClient::CanCreateWindow(
CefRefPtr<CefFrame> frame =
browser->GetFrame(last_create_window_params_.opener_frame_id);
// TODO(cef): Figure out how to populate CefPopupFeatures.
// See: http://crbug.com/110510
CefPopupFeatures features;
CefPopupFeatures cef_features;
TranslatePopupFeatures(features, cef_features);
#if (defined(OS_WIN) || defined(OS_MACOSX))
// Default to the size from the popup features.
if (features.xSet)
pending_info->window_info.x = features.x;
if (features.ySet)
pending_info->window_info.y = features.y;
if (features.widthSet)
pending_info->window_info.width = features.width;
if (features.heightSet)
pending_info->window_info.height = features.height;
if (cef_features.xSet)
pending_info->window_info.x = cef_features.x;
if (cef_features.ySet)
pending_info->window_info.y = cef_features.y;
if (cef_features.widthSet)
pending_info->window_info.width = cef_features.width;
if (cef_features.heightSet)
pending_info->window_info.height = cef_features.height;
#endif
allow = !handler->OnBeforePopup(browser.get(),
frame,
last_create_window_params_.target_url.spec(),
last_create_window_params_.target_frame_name,
features,
cef_features,
pending_info->window_info,
pending_info->client,
pending_info->settings,

View File

@@ -96,10 +96,18 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::CertificateRequestResultType* result) OVERRIDE;
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
virtual bool CanCreateWindow(const GURL& opener_url,
const GURL& origin,
const GURL& source_origin,
WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
WindowOpenDisposition disposition,
const WebKit::WebWindowFeatures& features,
bool user_gesture,
bool opener_suppressed,
content::ResourceContext* context,
int render_process_id,
bool is_guest,
int opener_id,
bool* no_javascript_access) OVERRIDE;
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,

View File

@@ -186,7 +186,7 @@ void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
#endif
}
void CefJavaScriptDialogManager::ResetJavaScriptState(
void CefJavaScriptDialogManager::CancelActiveAndPendingDialogs(
content::WebContents* web_contents) {
CefRefPtr<CefClient> client = browser_->GetClient();
if (client.get()) {
@@ -205,6 +205,10 @@ void CefJavaScriptDialogManager::ResetJavaScriptState(
#endif
}
void CefJavaScriptDialogManager::WebContentsDestroyed(
content::WebContents* web_contents) {
}
void CefJavaScriptDialogManager::DialogClosed(CefJavaScriptDialog* dialog) {
#if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK)
DCHECK_EQ(dialog, dialog_.get());

View File

@@ -38,7 +38,10 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
bool is_reload,
const DialogClosedCallback& callback) OVERRIDE;
virtual void ResetJavaScriptState(
virtual void CancelActiveAndPendingDialogs(
content::WebContents* web_contents) OVERRIDE;
virtual void WebContentsDestroyed(
content::WebContents* web_contents) OVERRIDE;
// Called by the CefJavaScriptDialog when it closes.

View File

@@ -6,7 +6,7 @@
#include "libcef/common/command_line_impl.h"
#include "base/logging.h"
#include "base/process_util.h"
#include "base/process/launch.h"
#include "content/public/browser/browser_thread.h"
bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {

View File

@@ -452,20 +452,19 @@ bool CefDictionaryValueImpl::SetList(const CefString& key,
}
bool CefDictionaryValueImpl::RemoveInternal(const CefString& key) {
base::Value* out_value = NULL;
scoped_ptr<base::Value> out_value;
if (!mutable_value()->RemoveWithoutPathExpansion(key, &out_value))
return false;
// Remove the value.
controller()->Remove(out_value, true);
controller()->Remove(out_value.get(), true);
// Only list and dictionary types may have dependencies.
if (out_value->IsType(base::Value::TYPE_LIST) ||
out_value->IsType(base::Value::TYPE_DICTIONARY)) {
controller()->RemoveDependencies(out_value);
controller()->RemoveDependencies(out_value.get());
}
delete out_value;
return true;
}
@@ -811,20 +810,19 @@ bool CefListValueImpl::SetList(int index, CefRefPtr<CefListValue> value) {
}
bool CefListValueImpl::RemoveInternal(int index) {
base::Value* out_value = NULL;
scoped_ptr<base::Value> out_value;
if (!mutable_value()->Remove(index, &out_value))
return false;
// Remove the value.
controller()->Remove(out_value, true);
controller()->Remove(out_value.get(), true);
// Only list and dictionary types may have dependencies.
if (out_value->IsType(base::Value::TYPE_LIST) ||
out_value->IsType(base::Value::TYPE_DICTIONARY)) {
controller()->RemoveDependencies(out_value);
controller()->RemoveDependencies(out_value.get());
}
delete out_value;
return true;
}