| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 WebViewImpl::UserGestureNotifier::UserGestureNotifier(WebViewImpl* view) | 435 WebViewImpl::UserGestureNotifier::UserGestureNotifier(WebViewImpl* view) |
| 436 // TODO(kenrb, alexmos): |m_frame| should be set to the local root frame, | 436 // TODO(kenrb, alexmos): |m_frame| should be set to the local root frame, |
| 437 // not the main frame. See crbug.com/589894. | 437 // not the main frame. See crbug.com/589894. |
| 438 : m_frame(view->mainFrameImpl()), | 438 : m_frame(view->mainFrameImpl()), |
| 439 m_userGestureObserved(&view->m_userGestureObserved) { | 439 m_userGestureObserved(&view->m_userGestureObserved) { |
| 440 DCHECK(m_userGestureObserved); | 440 DCHECK(m_userGestureObserved); |
| 441 } | 441 } |
| 442 | 442 |
| 443 WebViewImpl::UserGestureNotifier::~UserGestureNotifier() { | 443 WebViewImpl::UserGestureNotifier::~UserGestureNotifier() { |
| 444 if (!*m_userGestureObserved && m_frame && | 444 if (!*m_userGestureObserved && m_frame && |
| 445 m_frame->frame()->document()->hasReceivedUserGesture()) { | 445 m_frame->frame()->hasReceivedUserGesture()) { |
| 446 *m_userGestureObserved = true; | 446 *m_userGestureObserved = true; |
| 447 if (m_frame && m_frame->autofillClient()) | 447 if (m_frame && m_frame->autofillClient()) |
| 448 m_frame->autofillClient()->firstUserGestureObserved(); | 448 m_frame->autofillClient()->firstUserGestureObserved(); |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 | 451 |
| 452 WebDevToolsAgentImpl* WebViewImpl::mainFrameDevToolsAgentImpl() { | 452 WebDevToolsAgentImpl* WebViewImpl::mainFrameDevToolsAgentImpl() { |
| 453 WebLocalFrameImpl* mainFrame = mainFrameImpl(); | 453 WebLocalFrameImpl* mainFrame = mainFrameImpl(); |
| 454 return mainFrame ? mainFrame->devToolsAgentImpl() : nullptr; | 454 return mainFrame ? mainFrame->devToolsAgentImpl() : nullptr; |
| 455 } | 455 } |
| (...skipping 3735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4191 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4192 return nullptr; | 4192 return nullptr; |
| 4193 return focusedFrame; | 4193 return focusedFrame; |
| 4194 } | 4194 } |
| 4195 | 4195 |
| 4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4196 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4197 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4198 } | 4198 } |
| 4199 | 4199 |
| 4200 } // namespace blink | 4200 } // namespace blink |
| OLD | NEW |