Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: mojo/services/html_viewer/html_document_view.cc

Issue 409883007: Mojo: add support for cookies to HTMLViewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_document_view.cc
diff --git a/mojo/services/html_viewer/html_document_view.cc b/mojo/services/html_viewer/html_document_view.cc
index 038763bcee3b35bdcceae9d020ae146276d0f349..e5e318b32478f3a6cb296ef7b780fe3c8c86ec99 100644
--- a/mojo/services/html_viewer/html_document_view.cc
+++ b/mojo/services/html_viewer/html_document_view.cc
@@ -15,6 +15,7 @@
#include "mojo/services/public/cpp/view_manager/view.h"
#include "mojo/services/public/cpp/view_manager/view_observer.h"
#include "skia/ext/refptr.h"
+#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
@@ -32,6 +33,7 @@ namespace {
void ConfigureSettings(blink::WebSettings* settings) {
settings->setAcceleratedCompositingEnabled(false);
+ settings->setCookieEnabled(true);
settings->setDefaultFixedFontSize(13);
settings->setDefaultFontSize(16);
settings->setLoadsImagesAutomatically(true);
@@ -139,12 +141,18 @@ void HTMLDocumentView::didInvalidateRect(const blink::WebRect& rect) {
bool HTMLDocumentView::allowsBrokenNullLayerTreeView() const {
// TODO(darin): Switch to using compositor bindings.
//
- // NOTE: Note to Blink maintainers, feel free to just break this code if it
- // is the last using compositor bindings and you want to delete the old path.
+ // NOTE: Note to Blink maintainers, feel free to break this code if it is the
+ // last NOT using compositor bindings and you want to delete this code path.
//
return true;
}
+blink::WebCookieJar* HTMLDocumentView::cookieJar(blink::WebLocalFrame* frame) {
+ // TODO(darin): Blink does not fallback to the Platform provided WebCookieJar.
+ // Either it should, as it once did, or we should find another solution here.
+ return blink::Platform::current()->cookieJar();
+}
+
blink::WebNavigationPolicy HTMLDocumentView::decidePolicyForNavigation(
blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data,
const blink::WebURLRequest& request, blink::WebNavigationType nav_type,
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698