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

Side by Side Diff: mojo/services/html_viewer/html_document_view.cc

Issue 549273002: Various mojom cleanup from ContentHandler changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « mojo/services/BUILD.gn ('k') | mojo/services/launcher/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/html_viewer/html_document_view.h" 5 #include "mojo/services/html_viewer/html_document_view.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return blink::Platform::current()->cookieJar(); 184 return blink::Platform::current()->cookieJar();
185 } 185 }
186 186
187 blink::WebNavigationPolicy HTMLDocumentView::decidePolicyForNavigation( 187 blink::WebNavigationPolicy HTMLDocumentView::decidePolicyForNavigation(
188 blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data, 188 blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data,
189 const blink::WebURLRequest& request, blink::WebNavigationType nav_type, 189 const blink::WebURLRequest& request, blink::WebNavigationType nav_type,
190 blink::WebNavigationPolicy default_policy, bool is_redirect) { 190 blink::WebNavigationPolicy default_policy, bool is_redirect) {
191 if (CanNavigateLocally(frame, request)) 191 if (CanNavigateLocally(frame, request))
192 return default_policy; 192 return default_policy;
193 193
194 NavigationDetailsPtr nav_details(NavigationDetails::New());
195 nav_details->request = URLRequest::From(request);
196
197 navigator_host_->RequestNavigate( 194 navigator_host_->RequestNavigate(
198 WebNavigationPolicyToNavigationTarget(default_policy), 195 WebNavigationPolicyToNavigationTarget(default_policy),
199 nav_details.Pass()); 196 URLRequest::From(request).Pass());
200 197
201 return blink::WebNavigationPolicyIgnore; 198 return blink::WebNavigationPolicyIgnore;
202 } 199 }
203 200
204 void HTMLDocumentView::didAddMessageToConsole( 201 void HTMLDocumentView::didAddMessageToConsole(
205 const blink::WebConsoleMessage& message, 202 const blink::WebConsoleMessage& message,
206 const blink::WebString& source_name, 203 const blink::WebString& source_name,
207 unsigned source_line, 204 unsigned source_line,
208 const blink::WebString& stack_trace) { 205 const blink::WebString& stack_trace) {
209 } 206 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 245
249 skia::RefPtr<SkCanvas> canvas = skia::AdoptRef(SkCanvas::NewRaster( 246 skia::RefPtr<SkCanvas> canvas = skia::AdoptRef(SkCanvas::NewRaster(
250 SkImageInfo::MakeN32(width, height, kOpaque_SkAlphaType))); 247 SkImageInfo::MakeN32(width, height, kOpaque_SkAlphaType)));
251 248
252 web_view_->paint(canvas.get(), gfx::Rect(0, 0, width, height)); 249 web_view_->paint(canvas.get(), gfx::Rect(0, 0, width, height));
253 250
254 root_->SetContents(canvas->getDevice()->accessBitmap(false)); 251 root_->SetContents(canvas->getDevice()->accessBitmap(false));
255 } 252 }
256 253
257 } // namespace mojo 254 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/BUILD.gn ('k') | mojo/services/launcher/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698