OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 } | 696 } |
697 | 697 |
698 void LocalDOMWindow::setLocation(const String& urlString, SetLocationLocking loc
king) | 698 void LocalDOMWindow::setLocation(const String& urlString, SetLocationLocking loc
king) |
699 { | 699 { |
700 if (!m_frame) | 700 if (!m_frame) |
701 return; | 701 return; |
702 FrameHost* host = m_frame->host(); | 702 FrameHost* host = m_frame->host(); |
703 if (!host) | 703 if (!host) |
704 return; | 704 return; |
705 mojo::URLRequestPtr request = mojo::URLRequest::New(); | 705 mojo::URLRequestPtr request = mojo::URLRequest::New(); |
706 request->url = urlString.toUTF8(); | 706 request->url = document()->completeURL(urlString).string().toUTF8(); |
707 host->services()->NavigatorHost()->RequestNavigate( | 707 host->services()->NavigatorHost()->RequestNavigate( |
708 mojo::TARGET_SOURCE_NODE, request.Pass()); | 708 mojo::TARGET_SOURCE_NODE, request.Pass()); |
709 } | 709 } |
710 | 710 |
711 void LocalDOMWindow::printErrorMessage(const String& message) | 711 void LocalDOMWindow::printErrorMessage(const String& message) |
712 { | 712 { |
713 if (message.isEmpty()) | 713 if (message.isEmpty()) |
714 return; | 714 return; |
715 | 715 |
716 frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); | 716 frameConsole()->addMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); |
(...skipping 10 matching lines...) Expand all Loading... |
727 { | 727 { |
728 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); | 728 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin
dow>::lifecycleNotifier()); |
729 } | 729 } |
730 | 730 |
731 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() | 731 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
tifier() |
732 { | 732 { |
733 return DOMWindowLifecycleNotifier::create(this); | 733 return DOMWindowLifecycleNotifier::create(this); |
734 } | 734 } |
735 | 735 |
736 } // namespace blink | 736 } // namespace blink |
OLD | NEW |