OLD | NEW |
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.h" | 5 #include "mojo/services/html_viewer/html_document.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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 269 } |
270 | 270 |
271 return blink::WebNavigationPolicyIgnore; | 271 return blink::WebNavigationPolicyIgnore; |
272 } | 272 } |
273 | 273 |
274 void HTMLDocument::didAddMessageToConsole( | 274 void HTMLDocument::didAddMessageToConsole( |
275 const blink::WebConsoleMessage& message, | 275 const blink::WebConsoleMessage& message, |
276 const blink::WebString& source_name, | 276 const blink::WebString& source_name, |
277 unsigned source_line, | 277 unsigned source_line, |
278 const blink::WebString& stack_trace) { | 278 const blink::WebString& stack_trace) { |
| 279 VLOG(1) << "[" << source_name.utf8() << "(" << source_line << ")] " |
| 280 << message.text.utf8(); |
279 } | 281 } |
280 | 282 |
281 void HTMLDocument::didNavigateWithinPage( | 283 void HTMLDocument::didNavigateWithinPage( |
282 blink::WebLocalFrame* frame, | 284 blink::WebLocalFrame* frame, |
283 const blink::WebHistoryItem& history_item, | 285 const blink::WebHistoryItem& history_item, |
284 blink::WebHistoryCommitType commit_type) { | 286 blink::WebHistoryCommitType commit_type) { |
285 if (navigator_host_.get()) | 287 if (navigator_host_.get()) |
286 navigator_host_->DidNavigateLocally(history_item.urlString().utf8()); | 288 navigator_host_->DidNavigateLocally(history_item.urlString().utf8()); |
287 } | 289 } |
288 | 290 |
(...skipping 22 matching lines...) Expand all Loading... |
311 } | 313 } |
312 | 314 |
313 void HTMLDocument::OnViewInputEvent(View* view, const mojo::EventPtr& event) { | 315 void HTMLDocument::OnViewInputEvent(View* view, const mojo::EventPtr& event) { |
314 scoped_ptr<blink::WebInputEvent> web_event = | 316 scoped_ptr<blink::WebInputEvent> web_event = |
315 event.To<scoped_ptr<blink::WebInputEvent>>(); | 317 event.To<scoped_ptr<blink::WebInputEvent>>(); |
316 if (web_event) | 318 if (web_event) |
317 web_view_->handleInputEvent(*web_event); | 319 web_view_->handleInputEvent(*web_event); |
318 } | 320 } |
319 | 321 |
320 } // namespace html_viewer | 322 } // namespace html_viewer |
OLD | NEW |