| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 #include "SkiaUtils.h" | 124 #include "SkiaUtils.h" |
| 125 #include "SubstituteData.h" | 125 #include "SubstituteData.h" |
| 126 #include "TextIterator.h" | 126 #include "TextIterator.h" |
| 127 #include "TextAffinity.h" | 127 #include "TextAffinity.h" |
| 128 #include "XPathResult.h" | 128 #include "XPathResult.h" |
| 129 | 129 |
| 130 MSVC_POP_WARNING(); | 130 MSVC_POP_WARNING(); |
| 131 | 131 |
| 132 #undef LOG | 132 #undef LOG |
| 133 | 133 |
| 134 #include "base/base_switches.h" |
| 134 #include "base/basictypes.h" | 135 #include "base/basictypes.h" |
| 136 #include "base/command_line.h" |
| 135 #include "base/gfx/rect.h" | 137 #include "base/gfx/rect.h" |
| 136 #include "base/logging.h" | 138 #include "base/logging.h" |
| 137 #include "base/message_loop.h" | 139 #include "base/message_loop.h" |
| 138 #include "base/stats_counters.h" | 140 #include "base/stats_counters.h" |
| 139 #include "base/string_util.h" | 141 #include "base/string_util.h" |
| 140 #include "net/base/net_errors.h" | 142 #include "net/base/net_errors.h" |
| 141 #include "skia/ext/bitmap_platform_device.h" | 143 #include "skia/ext/bitmap_platform_device.h" |
| 142 #include "skia/ext/platform_canvas.h" | 144 #include "skia/ext/platform_canvas.h" |
| 143 #include "webkit/api/public/WebConsoleMessage.h" | 145 #include "webkit/api/public/WebConsoleMessage.h" |
| 144 #include "webkit/api/public/WebFindOptions.h" | 146 #include "webkit/api/public/WebFindOptions.h" |
| (...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 const WebScriptSource* sources_in, int num_sources) { | 1690 const WebScriptSource* sources_in, int num_sources) { |
| 1689 Vector<WebCore::ScriptSourceCode> sources; | 1691 Vector<WebCore::ScriptSourceCode> sources; |
| 1690 | 1692 |
| 1691 for (int i = 0; i < num_sources; ++i) { | 1693 for (int i = 0; i < num_sources; ++i) { |
| 1692 sources.append(WebCore::ScriptSourceCode( | 1694 sources.append(WebCore::ScriptSourceCode( |
| 1693 webkit_glue::WebStringToString(sources_in[i].code), | 1695 webkit_glue::WebStringToString(sources_in[i].code), |
| 1694 webkit_glue::WebURLToKURL(sources_in[i].url), | 1696 webkit_glue::WebURLToKURL(sources_in[i].url), |
| 1695 sources_in[i].startLine)); | 1697 sources_in[i].startLine)); |
| 1696 } | 1698 } |
| 1697 | 1699 |
| 1698 frame_->script()->evaluateInNewContext(sources); | 1700 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kIsolatedWorld)) |
| 1701 frame_->script()->evaluateInNewWorld(sources); |
| 1702 else |
| 1703 frame_->script()->evaluateInNewContext(sources); |
| 1699 } | 1704 } |
| 1700 | 1705 |
| 1701 std::wstring WebFrameImpl::GetName() { | 1706 std::wstring WebFrameImpl::GetName() { |
| 1702 return webkit_glue::StringToStdWString(frame_->tree()->name()); | 1707 return webkit_glue::StringToStdWString(frame_->tree()->name()); |
| 1703 } | 1708 } |
| 1704 | 1709 |
| 1705 WebTextInput* WebFrameImpl::GetTextInput() { | 1710 WebTextInput* WebFrameImpl::GetTextInput() { |
| 1706 if (!webtextinput_impl_.get()) { | 1711 if (!webtextinput_impl_.get()) { |
| 1707 webtextinput_impl_.reset(new WebTextInputImpl(this)); | 1712 webtextinput_impl_.reset(new WebTextInputImpl(this)); |
| 1708 } | 1713 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1919 return password_listeners_.get(input_element); | 1924 return password_listeners_.get(input_element); |
| 1920 } | 1925 } |
| 1921 | 1926 |
| 1922 void WebFrameImpl::ClearPasswordListeners() { | 1927 void WebFrameImpl::ClearPasswordListeners() { |
| 1923 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); | 1928 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); |
| 1924 iter != password_listeners_.end(); ++iter) { | 1929 iter != password_listeners_.end(); ++iter) { |
| 1925 delete iter->second; | 1930 delete iter->second; |
| 1926 } | 1931 } |
| 1927 password_listeners_.clear(); | 1932 password_listeners_.clear(); |
| 1928 } | 1933 } |
| OLD | NEW |