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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 334 |
335 private: | 335 private: |
336 DISALLOW_COPY_AND_ASSIGN(ChromePrintContext); | 336 DISALLOW_COPY_AND_ASSIGN(ChromePrintContext); |
337 }; | 337 }; |
338 | 338 |
339 // WebFrameImpl ---------------------------------------------------------------- | 339 // WebFrameImpl ---------------------------------------------------------------- |
340 | 340 |
341 int WebFrameImpl::live_object_count_ = 0; | 341 int WebFrameImpl::live_object_count_ = 0; |
342 | 342 |
343 // static | 343 // static |
344 WebFrame* WebFrame::RetrieveActiveFrame() { | 344 WebFrame* WebFrame::RetrieveFrameForEnteredContext() { |
345 WebCore::Frame* frame = WebCore::ScriptController::retrieveActiveFrame(); | 345 WebCore::Frame* frame = |
| 346 WebCore::ScriptController::retrieveFrameForEnteredContext(); |
346 if (frame) | 347 if (frame) |
347 return WebFrameImpl::FromFrame(frame); | 348 return WebFrameImpl::FromFrame(frame); |
348 else | 349 else |
| 350 return NULL; |
| 351 } |
| 352 |
| 353 // static |
| 354 WebFrame* WebFrame::RetrieveFrameForCurrentContext() { |
| 355 WebCore::Frame* frame = |
| 356 WebCore::ScriptController::retrieveFrameForCurrentContext(); |
| 357 if (frame) |
| 358 return WebFrameImpl::FromFrame(frame); |
| 359 else |
349 return NULL; | 360 return NULL; |
350 } | 361 } |
351 | 362 |
352 WebFrameImpl::WebFrameImpl() | 363 WebFrameImpl::WebFrameImpl() |
353 // Don't complain about using "this" in initializer list. | 364 // Don't complain about using "this" in initializer list. |
354 MSVC_PUSH_DISABLE_WARNING(4355) | 365 MSVC_PUSH_DISABLE_WARNING(4355) |
355 : frame_loader_client_(this), | 366 : frame_loader_client_(this), |
356 scope_matches_factory_(this), | 367 scope_matches_factory_(this), |
357 MSVC_POP_WARNING() | 368 MSVC_POP_WARNING() |
358 currently_loading_request_(NULL), | 369 currently_loading_request_(NULL), |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 return password_listeners_.get(input_element); | 1928 return password_listeners_.get(input_element); |
1918 } | 1929 } |
1919 | 1930 |
1920 void WebFrameImpl::ClearPasswordListeners() { | 1931 void WebFrameImpl::ClearPasswordListeners() { |
1921 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); | 1932 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); |
1922 iter != password_listeners_.end(); ++iter) { | 1933 iter != password_listeners_.end(); ++iter) { |
1923 delete iter->second; | 1934 delete iter->second; |
1924 } | 1935 } |
1925 password_listeners_.clear(); | 1936 password_listeners_.clear(); |
1926 } | 1937 } |
OLD | NEW |