Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2851993002: Move more methods from WebViewImpl to WebViewBase, and cut dependencies. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 } 1763 }
1764 1764
1765 LocalDOMWindow* WebViewImpl::PagePopupWindow() const { 1765 LocalDOMWindow* WebViewImpl::PagePopupWindow() const {
1766 return page_popup_ ? page_popup_->Window() : nullptr; 1766 return page_popup_ ? page_popup_->Window() : nullptr;
1767 } 1767 }
1768 1768
1769 Frame* WebViewImpl::FocusedCoreFrame() const { 1769 Frame* WebViewImpl::FocusedCoreFrame() const {
1770 return page_ ? page_->GetFocusController().FocusedOrMainFrame() : nullptr; 1770 return page_ ? page_->GetFocusController().FocusedOrMainFrame() : nullptr;
1771 } 1771 }
1772 1772
1773 WebViewBase* WebViewBase::FromPage(Page* page) {
1774 return WebViewImpl::FromPage(page);
1775 }
1776
1773 WebViewImpl* WebViewImpl::FromPage(Page* page) { 1777 WebViewImpl* WebViewImpl::FromPage(Page* page) {
1774 return page ? static_cast<WebViewImpl*>(page->GetChromeClient().WebView()) 1778 return page ? static_cast<WebViewImpl*>(page->GetChromeClient().WebView())
1775 : nullptr; 1779 : nullptr;
1776 } 1780 }
1777 1781
1778 // WebWidget ------------------------------------------------------------------ 1782 // WebWidget ------------------------------------------------------------------
1779 1783
1780 void WebViewImpl::Close() { 1784 void WebViewImpl::Close() {
1781 DCHECK(AllInstances().Contains(this)); 1785 DCHECK(AllInstances().Contains(this));
1782 AllInstances().erase(this); 1786 AllInstances().erase(this);
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
3718 GetPageScaleConstraintsSet().SetNeedsReset(false); 3722 GetPageScaleConstraintsSet().SetNeedsReset(false);
3719 UpdateLayerTreeViewport(); 3723 UpdateLayerTreeViewport();
3720 client_->PageScaleFactorChanged(); 3724 client_->PageScaleFactorChanged();
3721 dev_tools_emulator_->MainFrameScrollOrScaleChanged(); 3725 dev_tools_emulator_->MainFrameScrollOrScaleChanged();
3722 } 3726 }
3723 3727
3724 void WebViewImpl::MainFrameScrollOffsetChanged() { 3728 void WebViewImpl::MainFrameScrollOffsetChanged() {
3725 dev_tools_emulator_->MainFrameScrollOrScaleChanged(); 3729 dev_tools_emulator_->MainFrameScrollOrScaleChanged();
3726 } 3730 }
3727 3731
3732 bool WebViewBase::UseExternalPopupMenus() {
3733 return WebViewImpl::UseExternalPopupMenus();
3734 }
3735
3728 bool WebViewImpl::UseExternalPopupMenus() { 3736 bool WebViewImpl::UseExternalPopupMenus() {
3729 return g_should_use_external_popup_menus; 3737 return g_should_use_external_popup_menus;
3730 } 3738 }
3731 3739
3732 void WebViewImpl::SetBackgroundColorOverride(WebColor color) { 3740 void WebViewImpl::SetBackgroundColorOverride(WebColor color) {
3733 background_color_override_enabled_ = true; 3741 background_color_override_enabled_ = true;
3734 background_color_override_ = color; 3742 background_color_override_ = color;
3735 UpdateLayerTreeBackgroundColor(); 3743 UpdateLayerTreeBackgroundColor();
3736 } 3744 }
3737 3745
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
4172 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4180 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4173 return nullptr; 4181 return nullptr;
4174 return focused_frame; 4182 return focused_frame;
4175 } 4183 }
4176 4184
4177 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4185 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4178 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4186 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4179 } 4187 }
4180 4188
4181 } // namespace blink 4189 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698