Merge revision 542 changes:

- Add CefCookieManager interface and CefRequestHandler::GetCookieManager for custom cookie handling (issue #542).
- Support getting and setting cookies with custom scheme handlers (issue #555).
- Support calling CefFrame::GetIdentifier and CefFrame::GetURL on any thread (issue #556).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@544 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-03-22 22:10:49 +00:00
parent 1d54b2de7d
commit bba09e1319
32 changed files with 3048 additions and 1483 deletions

View File

@@ -3,17 +3,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// BrowserWebViewDelegate class:
// BrowserWebViewDelegate class:
// This class implements the WebViewDelegate methods for the test shell. One
// instance is owned by each CefBrowser.
#ifndef _BROWSER_WEBVIEW_DELEGATE_H
#define _BROWSER_WEBVIEW_DELEGATE_H
#ifndef CEF_LIBCEF_BROWSER_WEBVIEW_DELEGATE_H_
#define CEF_LIBCEF_BROWSER_WEBVIEW_DELEGATE_H_
#pragma once
#include <map>
#include <string>
#include <vector>
#include "libcef/browser_navigation_controller.h"
#include "libcef/browser_webcookiejar_impl.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
@@ -26,11 +32,14 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/webplugin_page_delegate.h"
#include "browser_navigation_controller.h"
#if defined(TOOLKIT_USES_GTK)
#include <gdk/gdk.h> // NOLINT(build/include_order)
#endif
#if defined(OS_MACOSX)
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
#include "external_popup_menu_mac.h"
#include "libcef/external_popup_menu_mac.h"
#endif
#if defined(OS_WIN)
@@ -38,10 +47,6 @@ class BrowserDragDelegate;
class WebDropTarget;
#endif
#if defined(TOOLKIT_USES_GTK)
#include <gdk/gdk.h>
#endif
class CefBrowserImpl;
class GURL;
class WebWidgetHost;
@@ -145,6 +150,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost(
WebKit::WebFrame* frame, WebKit::WebApplicationCacheHostClient* client)
OVERRIDE;
virtual WebKit::WebCookieJar* cookieJar(WebKit::WebFrame*) OVERRIDE;
virtual void willClose(WebKit::WebFrame*) OVERRIDE;
virtual void loadURLExternally(
WebKit::WebFrame*, const WebKit::WebURLRequest&,
@@ -193,7 +199,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
virtual void openFileSystem(
WebKit::WebFrame* frame,
WebKit::WebFileSystem::Type type,
long long size,
long long size, // NOLINT(runtime/int)
bool create,
WebKit::WebFileSystemCallbacks* callbacks) OVERRIDE;
@@ -287,9 +293,9 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
CefString* result);
// Called to show the file chooser dialog.
bool ShowFileChooser(std::vector<FilePath>& file_names,
const bool multi_select,
const WebKit::WebString& title,
bool ShowFileChooser(std::vector<FilePath>& file_names,
const bool multi_select,
const WebKit::WebString& title,
const FilePath& default_file);
// Called to show status messages.
@@ -314,7 +320,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
int& type_flags);
private:
// Causes navigation actions just printout the intended navigation instead
// Causes navigation actions just printout the intended navigation instead
// of taking you to the page. This is used for cases like mailto, where you
// don't actually want to open the mail program.
bool policy_delegate_enabled_;
@@ -367,7 +373,9 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
std::string edit_command_name_;
std::string edit_command_value_;
BrowserWebCookieJarImpl cookie_jar_;
DISALLOW_COPY_AND_ASSIGN(BrowserWebViewDelegate);
};
#endif // _BROWSER_WEBVIEW_DELEGATE_H
#endif // CEF_LIBCEF_BROWSER_WEBVIEW_DELEGATE_H_