| 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 { | 893 { |
| 894 if (!frame()) | 894 if (!frame()) |
| 895 return; | 895 return; |
| 896 | 896 |
| 897 FrameHost* host = frame()->host(); | 897 FrameHost* host = frame()->host(); |
| 898 if (!host) | 898 if (!host) |
| 899 return; | 899 return; |
| 900 | 900 |
| 901 ASSERT(context); | 901 ASSERT(context); |
| 902 | 902 |
| 903 bool allowFocus = context->isWindowFocusAllowed(); | 903 bool allowFocus = context->isWindowInteractionAllowed(); |
| 904 if (allowFocus) { | 904 if (allowFocus) { |
| 905 context->consumeWindowFocus(); | 905 context->consumeWindowInteraction(); |
| 906 } else { | 906 } else { |
| 907 ASSERT(isMainThread()); | 907 ASSERT(isMainThread()); |
| 908 allowFocus = opener() && (opener() != this) && (toDocument(context)->dom
Window() == opener()); | 908 allowFocus = opener() && (opener() != this) && (toDocument(context)->dom
Window() == opener()); |
| 909 } | 909 } |
| 910 | 910 |
| 911 // If we're a top level window, bring the window to the front. | 911 // If we're a top level window, bring the window to the front. |
| 912 if (frame()->isMainFrame() && allowFocus) | 912 if (frame()->isMainFrame() && allowFocus) |
| 913 host->chrome().focus(); | 913 host->chrome().focus(); |
| 914 | 914 |
| 915 frame()->eventHandler().focusDocumentView(); | 915 frame()->eventHandler().focusDocumentView(); |
| (...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 return m_frameObserver->frame(); | 1835 return m_frameObserver->frame(); |
| 1836 } | 1836 } |
| 1837 | 1837 |
| 1838 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | 1838 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) |
| 1839 { | 1839 { |
| 1840 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. | 1840 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. |
| 1841 return v8::Handle<v8::Object>(); | 1841 return v8::Handle<v8::Object>(); |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 } // namespace blink | 1844 } // namespace blink |
| OLD | NEW |