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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 WebColor color_; | 267 WebColor color_; |
268 }; | 268 }; |
269 | 269 |
270 } // namespace | 270 } // namespace |
271 | 271 |
272 // WebView ---------------------------------------------------------------- | 272 // WebView ---------------------------------------------------------------- |
273 | 273 |
274 WebView* WebView::Create(WebViewClient* client, | 274 WebView* WebView::Create(WebViewClient* client, |
275 WebPageVisibilityState visibility_state) { | 275 WebPageVisibilityState visibility_state) { |
276 // Pass the WebViewImpl's self-reference to the caller. | |
277 return WebViewImpl::Create(client, visibility_state); | 276 return WebViewImpl::Create(client, visibility_state); |
278 } | 277 } |
279 | 278 |
280 WebViewImpl* WebViewImpl::Create(WebViewClient* client, | 279 WebViewBase* WebViewImpl::Create(WebViewClient* client, |
281 WebPageVisibilityState visibility_state) { | 280 WebPageVisibilityState visibility_state) { |
282 // Pass the WebViewImpl's self-reference to the caller. | 281 // Pass the WebViewImpl's self-reference to the caller. |
283 return AdoptRef(new WebViewImpl(client, visibility_state)).LeakRef(); | 282 return AdoptRef(new WebViewImpl(client, visibility_state)).LeakRef(); |
284 } | 283 } |
285 | 284 |
286 const WebInputEvent* WebViewBase::CurrentInputEvent() { | 285 const WebInputEvent* WebViewBase::CurrentInputEvent() { |
287 return WebViewImpl::CurrentInputEvent(); | 286 return WebViewImpl::CurrentInputEvent(); |
288 } | 287 } |
289 | 288 |
290 void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { | 289 void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { |
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 } | 1766 } |
1768 | 1767 |
1769 Frame* WebViewImpl::FocusedCoreFrame() const { | 1768 Frame* WebViewImpl::FocusedCoreFrame() const { |
1770 return page_ ? page_->GetFocusController().FocusedOrMainFrame() : nullptr; | 1769 return page_ ? page_->GetFocusController().FocusedOrMainFrame() : nullptr; |
1771 } | 1770 } |
1772 | 1771 |
1773 WebViewBase* WebViewBase::FromPage(Page* page) { | 1772 WebViewBase* WebViewBase::FromPage(Page* page) { |
1774 return WebViewImpl::FromPage(page); | 1773 return WebViewImpl::FromPage(page); |
1775 } | 1774 } |
1776 | 1775 |
1777 WebViewImpl* WebViewImpl::FromPage(Page* page) { | 1776 WebViewBase* WebViewImpl::FromPage(Page* page) { |
1778 return page ? static_cast<WebViewImpl*>(page->GetChromeClient().WebView()) | 1777 return page ? static_cast<WebViewBase*>(page->GetChromeClient().WebView()) |
1779 : nullptr; | 1778 : nullptr; |
1780 } | 1779 } |
1781 | 1780 |
1782 // WebWidget ------------------------------------------------------------------ | 1781 // WebWidget ------------------------------------------------------------------ |
1783 | 1782 |
1784 void WebViewImpl::Close() { | 1783 void WebViewImpl::Close() { |
1785 DCHECK(AllInstances().Contains(this)); | 1784 DCHECK(AllInstances().Contains(this)); |
1786 AllInstances().erase(this); | 1785 AllInstances().erase(this); |
1787 | 1786 |
1788 if (page_) { | 1787 if (page_) { |
(...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4185 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4184 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4186 return nullptr; | 4185 return nullptr; |
4187 return focused_frame; | 4186 return focused_frame; |
4188 } | 4187 } |
4189 | 4188 |
4190 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4189 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4191 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4190 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4192 } | 4191 } |
4193 | 4192 |
4194 } // namespace blink | 4193 } // namespace blink |
OLD | NEW |