summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 05:44:17 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 05:44:17 +0000
commit9b7779b1a7559e4af1720408beb6e0b931e8435a (patch)
treee4fff86e87bcf539edcda3c3f73175a1d97e09ea /webkit/glue/webview_impl.cc
parent00c4079ca3b6753db530bc8c5522793f25aa6619 (diff)
downloadchromium_src-9b7779b1a7559e4af1720408beb6e0b931e8435a.zip
chromium_src-9b7779b1a7559e4af1720408beb6e0b931e8435a.tar.gz
chromium_src-9b7779b1a7559e4af1720408beb6e0b931e8435a.tar.bz2
Move various methods from glue/webview.h to api/public/WebView.h
I'll re-order the methods in webview_impl.cc in a follow-up CL. I wanted to keep this one easy to review. SetBackForwardListSize is no longer necessary given that BackForwardListChromium.cpp doesn't care about its capacity. R=dglazkov BUG=10033 TEST=none Review URL: http://codereview.chromium.org/251051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview_impl.cc')
-rw-r--r--webkit/glue/webview_impl.cc52
1 files changed, 14 insertions, 38 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 86cca15..cf4be81 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -338,7 +338,7 @@ WebView* WebView::Create(WebViewDelegate* delegate) {
return instance;
}
-void WebViewImpl::InitializeMainFrame(WebFrameClient* frame_client) {
+void WebViewImpl::initializeMainFrame(WebFrameClient* frame_client) {
// NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame
// and releases that reference once the corresponding Frame is destroyed.
scoped_refptr<WebFrameImpl> main_frame = new WebFrameImpl(frame_client);
@@ -370,7 +370,6 @@ void WebView::ResetVisitedLinkState() {
WebCore::PageGroup::pageGroup(kPageGroupName));
}
-
WebViewImpl::WebViewImpl(WebViewDelegate* delegate)
: delegate_(delegate),
ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)),
@@ -425,7 +424,12 @@ RenderTheme* WebViewImpl::theme() const {
return page_.get() ? page_->theme() : RenderTheme::defaultTheme().get();
}
-void WebViewImpl::SetTabKeyCyclesThroughElements(bool value) {
+bool WebViewImpl::tabKeyCyclesThroughElements() const {
+ ASSERT(page_.get());
+ return page_->tabKeyCyclesThroughElements();
+}
+
+void WebViewImpl::setTabKeyCyclesThroughElements(bool value) {
if (page_ != NULL) {
page_->setTabKeyCyclesThroughElements(value);
}
@@ -1607,30 +1611,6 @@ WebViewDelegate* WebViewImpl::GetDelegate() {
return delegate_;
}
-WebFrame* WebViewImpl::GetPreviousFrameBefore(WebFrame* frame, bool wrap) {
- WebFrameImpl* frame_impl = static_cast<WebFrameImpl*>(frame);
- WebCore::Frame* previous =
- frame_impl->frame()->tree()->traversePreviousWithWrap(wrap);
- return previous ? WebFrameImpl::FromFrame(previous) : NULL;
-}
-
-WebFrame* WebViewImpl::GetNextFrameAfter(WebFrame* frame, bool wrap) {
- WebFrameImpl* frame_impl = static_cast<WebFrameImpl*>(frame);
- WebCore::Frame* next =
- frame_impl->frame()->tree()->traverseNextWithWrap(wrap);
- return next ? WebFrameImpl::FromFrame(next) : NULL;
-}
-
-// TODO(darin): these navigation methods should be killed
-
-void WebViewImpl::StopLoading() {
- main_frame()->stopLoading();
-}
-
-void WebViewImpl::SetBackForwardListSize(int size) {
- page_->backForwardList()->setCapacity(size);
-}
-
const std::wstring& WebViewImpl::GetInspectorSettings() const {
return inspector_settings_;
}
@@ -1639,11 +1619,7 @@ void WebViewImpl::SetInspectorSettings(const std::wstring& settings) {
inspector_settings_ = settings;
}
-void WebViewImpl::ShowJavaScriptConsole() {
- page_->inspectorController()->showPanel(InspectorController::ConsolePanel);
-}
-
-bool WebViewImpl::SetDropEffect(bool accept) {
+bool WebViewImpl::setDropEffect(bool accept) {
if (drag_target_dispatch_) {
drop_effect_ = accept ? DROP_EFFECT_COPY : DROP_EFFECT_NONE;
return true;
@@ -1721,7 +1697,7 @@ WebDevToolsAgentImpl* WebViewImpl::GetWebDevToolsAgentImpl() {
return devtools_agent_.get();
}
-void WebViewImpl::SetIsTransparent(bool is_transparent) {
+void WebViewImpl::setIsTransparent(bool is_transparent) {
// Set any existing frames to be transparent.
WebCore::Frame* frame = page_->mainFrame();
while (frame) {
@@ -1733,7 +1709,7 @@ void WebViewImpl::SetIsTransparent(bool is_transparent) {
is_transparent_ = is_transparent;
}
-bool WebViewImpl::GetIsTransparent() const {
+bool WebViewImpl::isTransparent() const {
return is_transparent_;
}
@@ -1768,12 +1744,12 @@ void WebViewImpl::MediaPlayerActionAt(int x,
}
}
-void WebViewImpl::SetActive(bool active) {
+void WebViewImpl::setIsActive(bool active) {
if (page() && page()->focusController())
page()->focusController()->setActive(active);
}
-bool WebViewImpl::IsActive() {
+bool WebViewImpl::isActive() const {
return (page() && page()->focusController())
? page()->focusController()->isActive()
: false;
@@ -1897,10 +1873,10 @@ bool WebViewImpl::GetSpellingPanelVisibility() {
return spelling_panel_is_visible_;
}
-void WebViewImpl::SetTabsToLinks(bool enable) {
+void WebViewImpl::setTabsToLinks(bool enable) {
tabs_to_links_ = enable;
}
-bool WebViewImpl::GetTabsToLinks() const {
+bool WebViewImpl::tabsToLinks() const {
return tabs_to_links_;
}