summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 22:35:27 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 22:35:27 +0000
commitb4bb25099b2bc9b1bc1df1b231c859ef82110e7d (patch)
tree5bf82ee33816b9066e5a829b6a256a747021fc93 /webkit
parent87772ec3b0265c72efd0bace14b30fafeee97769 (diff)
downloadchromium_src-b4bb25099b2bc9b1bc1df1b231c859ef82110e7d.zip
chromium_src-b4bb25099b2bc9b1bc1df1b231c859ef82110e7d.tar.gz
chromium_src-b4bb25099b2bc9b1bc1df1b231c859ef82110e7d.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 Originally reviewed here: http://codereview.chromium.org/251051 Review URL: http://codereview.chromium.org/255042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/public/WebView.h36
-rw-r--r--webkit/glue/chrome_client_impl.cc4
-rw-r--r--webkit/glue/dom_operations.cc2
-rw-r--r--webkit/glue/mimetype_unittest.cc2
-rw-r--r--webkit/glue/webframe_impl.cc40
-rw-r--r--webkit/glue/webpreferences.cc2
-rw-r--r--webkit/glue/webview.h52
-rw-r--r--webkit/glue/webview_impl.cc57
-rw-r--r--webkit/glue/webview_impl.h31
-rw-r--r--webkit/glue/webview_unittest.cc12
-rw-r--r--webkit/glue/webworker_impl.cc2
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc4
-rw-r--r--webkit/tools/test_shell/mac/test_shell_webview.mm2
-rw-r--r--webkit/tools/test_shell/mac/webview_host.mm2
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm2
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc4
-rw-r--r--webkit/tools/test_shell/webview_host_gtk.cc2
-rw-r--r--webkit/tools/test_shell/webview_host_win.cc2
19 files changed, 99 insertions, 163 deletions
diff --git a/webkit/api/public/WebView.h b/webkit/api/public/WebView.h
index b91e351..7904f95e 100644
--- a/webkit/api/public/WebView.h
+++ b/webkit/api/public/WebView.h
@@ -37,6 +37,7 @@
namespace WebKit {
class WebDragData;
class WebFrame;
+ class WebFrameClient;
class WebSettings;
class WebString;
class WebViewClient;
@@ -44,7 +45,16 @@ namespace WebKit {
class WebView : public WebWidget {
public:
- WEBKIT_API WebView* create(WebViewClient*);
+ // Initialization ------------------------------------------------------
+
+ // FIXME enable this once WebViewDelegate has been eliminated.
+ //WEBKIT_API WebView* create(WebViewClient*);
+
+ // After creating a WebView, you should immediately call this method.
+ // You can optionally modify the settings before calling this method.
+ // The WebFrameClient will receive events for the main frame and any
+ // child frames.
+ virtual void initializeMainFrame(WebFrameClient*) = 0;
// Options -------------------------------------------------------------
@@ -57,6 +67,25 @@ namespace WebKit {
virtual WebString pageEncoding() const = 0;
virtual void setPageEncoding(const WebString&) = 0;
+ // Makes the WebView transparent. This is useful if you want to have
+ // some custom background rendered behind it.
+ virtual bool isTransparent() const = 0;
+ virtual void setIsTransparent(bool) = 0;
+
+ // Controls whether pressing Tab key advances focus to links.
+ virtual bool tabsToLinks() const = 0;
+ virtual void setTabsToLinks(bool) = 0;
+
+ // Method that controls whether pressing Tab key cycles through page
+ // elements or inserts a '\t' char in the focused text area.
+ virtual bool tabKeyCyclesThroughElements() const = 0;
+ virtual void setTabKeyCyclesThroughElements(bool) = 0;
+
+ // Controls the WebView's active state, which may affect the rendering
+ // of elements on the page (i.e., tinting of input elements).
+ virtual bool isActive() const = 0;
+ virtual void setIsActive(bool) = 0;
+
// Closing -------------------------------------------------------------
@@ -146,6 +175,11 @@ namespace WebKit {
virtual int dragIdentity() = 0;
+ // Helper method for drag and drop target operations: override the
+ // default drop effect with either a "copy" (accept true) or "none"
+ // (accept false) effect. Return true on success.
+ virtual bool setDropEffect(bool accept) = 0;
+
// Developer tools -----------------------------------------------------
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index f96889c..4ea1f40 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -374,7 +374,7 @@ void ChromeClientImpl::closeWindowSoon() {
webview_->page()->setGroupName(WebCore::String());
// Make sure that all loading is stopped. Ensures that JS stops executing!
- webview_->StopLoading();
+ webview_->mainFrame()->stopLoading();
if (webview_->client())
webview_->client()->closeWidgetSoon();
@@ -439,7 +439,7 @@ bool ChromeClientImpl::shouldInterruptJavaScript() {
}
bool ChromeClientImpl::tabsToLinks() const {
- return webview_->GetTabsToLinks();
+ return webview_->tabsToLinks();
}
WebCore::IntRect ChromeClientImpl::windowResizerRect() const {
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index be2c7a8..986b61f 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -481,7 +481,7 @@ WebFrameImpl* GetWebFrameImplFromElement(WebCore::Element* element,
WebCore::HTMLFrameOwnerElement* frame_element =
static_cast<WebCore::HTMLFrameOwnerElement*>(element);
WebCore::Frame* content_frame = frame_element->contentFrame();
- return content_frame ? WebFrameImpl::FromFrame(content_frame) : NULL;
+ return WebFrameImpl::FromFrame(content_frame);
}
}
return NULL;
diff --git a/webkit/glue/mimetype_unittest.cc b/webkit/glue/mimetype_unittest.cc
index f55051f..46757f2 100644
--- a/webkit/glue/mimetype_unittest.cc
+++ b/webkit/glue/mimetype_unittest.cc
@@ -83,7 +83,7 @@ TEST_F(MimeTypeTests, MimeTypeTests) {
};
for (size_t i = 0; i < arraysize(not_text); ++i) {
CheckMimeType(not_text[i], L"");
- test_shell_->webView()->StopLoading();
+ test_shell_->webView()->mainFrame()->stopLoading();
}
// TODO(tc): make sure other mime types properly go to download (e.g.,
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index e49fed8..2b0772fd 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -375,20 +375,14 @@ static WebDataSource* DataSourceForDocLoader(DocumentLoader* loader) {
WebFrame* WebFrame::frameForEnteredContext() {
Frame* frame =
WebCore::ScriptController::retrieveFrameForEnteredContext();
- if (frame)
- return WebFrameImpl::FromFrame(frame);
- else
- return NULL;
+ return WebFrameImpl::FromFrame(frame);
}
// static
WebFrame* WebFrame::frameForCurrentContext() {
Frame* frame =
WebCore::ScriptController::retrieveFrameForCurrentContext();
- if (frame)
- return WebFrameImpl::FromFrame(frame);
- else
- return NULL;
+ return WebFrameImpl::FromFrame(frame);
}
WebString WebFrameImpl::name() const {
@@ -468,21 +462,17 @@ WebView* WebFrameImpl::view() const {
}
WebFrame* WebFrameImpl::opener() const {
- if (frame_) {
- Frame* opener = frame_->loader()->opener();
- if (opener)
- return FromFrame(opener);
- }
- return NULL;
+ Frame* opener = NULL;
+ if (frame_)
+ opener = frame_->loader()->opener();
+ return FromFrame(opener);
}
WebFrame* WebFrameImpl::parent() const {
- if (frame_) {
- Frame *parent = frame_->tree()->parent();
- if (parent)
- return FromFrame(parent);
- }
- return NULL;
+ Frame *parent = NULL;
+ if (frame_)
+ parent = frame_->tree()->parent();
+ return FromFrame(parent);
}
WebFrame* WebFrameImpl::top() const {
@@ -1643,7 +1633,7 @@ void WebFrameImpl::CreateFrameView() {
frame_->setView(view);
- if (web_view->GetIsTransparent())
+ if (web_view->isTransparent())
view->setTransparent(true);
// TODO(darin): The Mac code has a comment about this possibly being
@@ -1662,6 +1652,8 @@ void WebFrameImpl::CreateFrameView() {
// static
WebFrameImpl* WebFrameImpl::FromFrame(WebCore::Frame* frame) {
+ if (!frame)
+ return NULL;
return static_cast<WebFrameLoaderClient*>(
frame->loader()->client())->webframe();
}
@@ -1827,14 +1819,12 @@ void WebFrameImpl::SetMarkerActive(WebCore::Range* range, bool active) {
int WebFrameImpl::OrdinalOfFirstMatchForFrame(WebFrameImpl* frame) const {
int ordinal = 0;
- WebViewImpl* web_view = GetWebViewImpl();
- WebFrameImpl* const main_frame_impl = GetWebViewImpl()->main_frame();
+ WebFrameImpl* main_frame_impl = GetWebViewImpl()->main_frame();
// Iterate from the main frame up to (but not including) |frame| and
// add up the number of matches found so far.
for (WebFrameImpl* it = main_frame_impl;
it != frame;
- it = static_cast<WebFrameImpl*>(
- web_view->GetNextFrameAfter(it, true))) {
+ it = static_cast<WebFrameImpl*>(it->traverseNext(true))) {
if (it->last_match_count_ > 0)
ordinal += it->last_match_count_;
}
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index eccee6f..df437e6 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -84,5 +84,5 @@ void WebPreferences::Apply(WebView* web_view) const {
// Tabs to link is not part of the settings. WebCore calls
// ChromeClient::tabsToLinks which is part of the glue code.
- web_view->SetTabsToLinks(tabs_to_links);
+ web_view->setTabsToLinks(tabs_to_links);
}
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index 94df467..a6fa6fe 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -56,11 +56,6 @@ class WebView : public WebKit::WebView {
// notifications.
static WebView* Create(WebViewDelegate* delegate);
- // After creating a WebView, you should immediately call this function. You
- // can optionally modify the settings (via GetSettings()) in between. The
- // frame_client will receive events for the main frame and any child frames.
- virtual void InitializeMainFrame(WebKit::WebFrameClient* frame_client) = 0;
-
// Tells all Page instances of this view to update the visited link state for
// the specified hash.
static void UpdateVisitedLinkState(uint64 link_hash);
@@ -74,43 +69,10 @@ class WebView : public WebKit::WebView {
// using it, it will be NULL during closing of the view.
virtual WebViewDelegate* GetDelegate() = 0;
- // Method that controls whether pressing Tab key cycles through page elements
- // or inserts a '\t' char in text area
- virtual void SetTabKeyCyclesThroughElements(bool value) = 0;
-
- // Returns the frame previous to the specified frame, by traversing the frame
- // tree, wrapping around if necessary.
- virtual WebKit::WebFrame* GetPreviousFrameBefore(WebKit::WebFrame* frame, bool wrap) = 0;
-
- // Returns the frame after to the specified frame, by traversing the frame
- // tree, wrapping around if necessary.
- virtual WebKit::WebFrame* GetNextFrameAfter(WebKit::WebFrame* frame, bool wrap) = 0;
-
- // ---- TODO(darin): remove from here ----
-
- //
- // - (IBAction)stopLoading:(id)sender;
- virtual void StopLoading() = 0;
-
- // Sets the maximum size to allow WebCore's internal B/F list to grow to.
- // If not called, the list will have the default capacity specified in
- // BackForwardList.cpp.
- virtual void SetBackForwardListSize(int size) = 0;
-
- // ---- TODO(darin): remove to here ----
-
// Settings used by inspector.
virtual const std::wstring& GetInspectorSettings() const = 0;
virtual void SetInspectorSettings(const std::wstring& settings) = 0;
- // Show the JavaScript console.
- virtual void ShowJavaScriptConsole() = 0;
-
- // Helper method for drag and drop target operations: override the default
- // drop effect with either a "copy" (accept true) or "none" (accept false)
- // effect. Return true on success.
- virtual bool SetDropEffect(bool accept) = 0;
-
// Notifies the webview that autofill suggestions are available for a node.
virtual void AutofillSuggestionsForNode(
int64 node_id,
@@ -123,29 +85,15 @@ class WebView : public WebKit::WebView {
// Returns development tools agent instance belonging to this view.
virtual WebDevToolsAgent* GetWebDevToolsAgent() = 0;
- // Makes the webview transparent. Useful if you want to have some custom
- // background behind it.
- virtual void SetIsTransparent(bool is_transparent) = 0;
- virtual bool GetIsTransparent() const = 0;
-
virtual void SetSpellingPanelVisibility(bool is_visible) = 0;
virtual bool GetSpellingPanelVisibility() = 0;
- virtual void SetTabsToLinks(bool enable) = 0;
- virtual bool GetTabsToLinks() const = 0;
-
// Performs an action from a context menu for the node at the given
// location.
virtual void MediaPlayerActionAt(int x,
int y,
const MediaPlayerAction& action) = 0;
- // Updates the WebView's active state (i.e., control tints).
- virtual void SetActive(bool active) = 0;
-
- // Gets the WebView's active state (i.e., state of control tints).
- virtual bool IsActive() = 0;
-
private:
DISALLOW_COPY_AND_ASSIGN(WebView);
};
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 3572d57..fdc3f7a 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -339,7 +339,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);
@@ -371,7 +371,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)),
@@ -426,7 +425,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);
}
@@ -1303,12 +1307,11 @@ WebFrame* WebViewImpl::findFrameByName(
relative_to_frame = mainFrame();
Frame* frame = static_cast<WebFrameImpl*>(relative_to_frame)->frame();
frame = frame->tree()->find(name_str);
- return frame ? WebFrameImpl::FromFrame(frame) : NULL;
+ return WebFrameImpl::FromFrame(frame);
}
WebFrame* WebViewImpl::focusedFrame() {
- Frame* frame = GetFocusedWebCoreFrame();
- return frame ? WebFrameImpl::FromFrame(frame) : NULL;
+ return WebFrameImpl::FromFrame(GetFocusedWebCoreFrame());
}
void WebViewImpl::setFocusedFrame(WebFrame* frame) {
@@ -1608,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_;
}
@@ -1640,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;
@@ -1722,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) {
@@ -1734,7 +1709,7 @@ void WebViewImpl::SetIsTransparent(bool is_transparent) {
is_transparent_ = is_transparent;
}
-bool WebViewImpl::GetIsTransparent() const {
+bool WebViewImpl::isTransparent() const {
return is_transparent_;
}
@@ -1769,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;
@@ -1928,10 +1903,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_;
}
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index bad4764..c8d64ae 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -81,9 +81,18 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual void setTextDirection(WebKit::WebTextDirection direction);
// WebView methods:
+ virtual void initializeMainFrame(WebKit::WebFrameClient*);
virtual WebKit::WebSettings* settings();
virtual WebKit::WebString pageEncoding() const;
virtual void setPageEncoding(const WebKit::WebString& encoding);
+ virtual bool isTransparent() const;
+ virtual void setIsTransparent(bool value);
+ virtual bool tabsToLinks() const;
+ virtual void setTabsToLinks(bool value);
+ virtual bool tabKeyCyclesThroughElements() const;
+ virtual void setTabKeyCyclesThroughElements(bool value);
+ virtual bool isActive() const;
+ virtual void setIsActive(bool value);
virtual bool dispatchBeforeUnloadEvent();
virtual void dispatchUnloadEvent();
virtual WebKit::WebFrame* mainFrame();
@@ -119,42 +128,25 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
const WebKit::WebPoint& client_point,
const WebKit::WebPoint& screen_point);
virtual int dragIdentity();
+ virtual bool setDropEffect(bool accept);
virtual void inspectElementAt(const WebKit::WebPoint& point);
// WebView methods:
- virtual void InitializeMainFrame(WebKit::WebFrameClient* frame_client);
virtual WebViewDelegate* GetDelegate();
- virtual void SetTabKeyCyclesThroughElements(bool value);
- virtual WebKit::WebFrame* GetPreviousFrameBefore(WebKit::WebFrame* frame,
- bool wrap);
- virtual WebKit::WebFrame* GetNextFrameAfter(WebKit::WebFrame* frame,
- bool wrap);
- virtual void StopLoading();
- virtual void SetBackForwardListSize(int size);
virtual const std::wstring& GetInspectorSettings() const;
virtual void SetInspectorSettings(const std::wstring& settings);
- virtual void ShowJavaScriptConsole();
- virtual bool SetDropEffect(bool accept);
virtual void AutofillSuggestionsForNode(
int64 node_id,
const std::vector<std::wstring>& suggestions,
int default_suggestion_index);
virtual void HideAutofillPopup();
virtual void SetIgnoreInputEvents(bool new_value);
-
virtual WebDevToolsAgent* GetWebDevToolsAgent();
WebDevToolsAgentImpl* GetWebDevToolsAgentImpl();
-
- virtual void SetIsTransparent(bool is_transparent);
- virtual bool GetIsTransparent() const;
-
virtual void MediaPlayerActionAt(int x,
int y,
const MediaPlayerAction& action);
- virtual void SetActive(bool active);
- virtual bool IsActive();
-
// WebViewImpl
const WebKit::WebPoint& last_mouse_down_point() const {
@@ -260,9 +252,6 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual void SetSpellingPanelVisibility(bool is_visible);
virtual bool GetSpellingPanelVisibility();
- virtual void SetTabsToLinks(bool enable);
- virtual bool GetTabsToLinks() const;
-
#if ENABLE(NOTIFICATIONS)
// Returns the provider of desktop notifications.
WebKit::NotificationPresenterImpl* GetNotificationPresenter();
diff --git a/webkit/glue/webview_unittest.cc b/webkit/glue/webview_unittest.cc
index c3ae5c2..36f87c8 100644
--- a/webkit/glue/webview_unittest.cc
+++ b/webkit/glue/webview_unittest.cc
@@ -13,14 +13,14 @@ TEST_F(WebViewTest, GetContentAsPlainText) {
WebView* view = test_shell_->webView();
ASSERT_TRUE(view != 0);
- view->SetActive(true);
- EXPECT_TRUE(view->IsActive());
+ view->setIsActive(true);
+ EXPECT_TRUE(view->isActive());
- view->SetActive(false);
- EXPECT_FALSE(view->IsActive());
+ view->setIsActive(false);
+ EXPECT_FALSE(view->isActive());
- view->SetActive(true);
- EXPECT_TRUE(view->IsActive());
+ view->setIsActive(true);
+ EXPECT_TRUE(view->isActive());
}
// TODO(viettrungluu): add more tests
diff --git a/webkit/glue/webworker_impl.cc b/webkit/glue/webworker_impl.cc
index 520389a..2648341 100644
--- a/webkit/glue/webworker_impl.cc
+++ b/webkit/glue/webworker_impl.cc
@@ -141,7 +141,7 @@ void WebWorkerImpl::startWorkerContext(const WebURL& script_url,
DCHECK(!web_view_);
web_view_ = WebView::Create(NULL);
WebPreferences().Apply(web_view_);
- web_view_->InitializeMainFrame(WorkerWebFrameClient::GetSharedInstance());
+ web_view_->initializeMainFrame(WorkerWebFrameClient::GetSharedInstance());
WebFrameImpl* web_frame = static_cast<WebFrameImpl*>(web_view_->mainFrame());
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index bc88eb5..a57a383 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -414,7 +414,7 @@ void LayoutTestController::objCIdentityIsEqual(
void LayoutTestController::Reset() {
if (shell_) {
shell_->webView()->zoomDefault();
- shell_->webView()->SetTabKeyCyclesThroughElements(true);
+ shell_->webView()->setTabKeyCyclesThroughElements(true);
}
dump_as_text_ = false;
dump_editing_callbacks_ = false;
@@ -486,7 +486,7 @@ void LayoutTestController::setCanOpenWindows(
void LayoutTestController::setTabKeyCyclesThroughElements(
const CppArgumentList& args, CppVariant* result) {
if (args.size() > 0 && args[0].isBool()) {
- shell_->webView()->SetTabKeyCyclesThroughElements(args[0].ToBoolean());
+ shell_->webView()->setTabKeyCyclesThroughElements(args[0].ToBoolean());
}
result->SetNull();
}
diff --git a/webkit/tools/test_shell/mac/test_shell_webview.mm b/webkit/tools/test_shell/mac/test_shell_webview.mm
index 31d5c0a..908abde 100644
--- a/webkit/tools/test_shell/mac/test_shell_webview.mm
+++ b/webkit/tools/test_shell/mac/test_shell_webview.mm
@@ -76,7 +76,7 @@
- (IBAction)stopLoading:(id)sender {
if (shell_ && shell_->webView())
- shell_->webView()->StopLoading();
+ shell_->webView()->mainFrame()->stopLoading();
}
- (IBAction)takeURLStringValueFrom:(NSTextField *)sender {
diff --git a/webkit/tools/test_shell/mac/webview_host.mm b/webkit/tools/test_shell/mac/webview_host.mm
index b27a603..9f267a9 100644
--- a/webkit/tools/test_shell/mac/webview_host.mm
+++ b/webkit/tools/test_shell/mac/webview_host.mm
@@ -37,7 +37,7 @@ WebViewHost* WebViewHost::Create(NSView* parent_view,
host->webwidget_ = WebView::Create(delegate);
prefs.Apply(host->webview());
- host->webview()->InitializeMainFrame(delegate);
+ host->webview()->initializeMainFrame(delegate);
host->webwidget_->resize(WebSize(content_rect.size.width,
content_rect.size.height));
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index c9319ab..16661d8 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -88,7 +88,7 @@ void ForwardButtonClicked(GtkButton* button, TestShell* shell) {
// Callback for when you click the stop button.
void StopButtonClicked(GtkButton* button, TestShell* shell) {
- shell->webView()->StopLoading();
+ shell->webView()->mainFrame()->stopLoading();
}
// Callback for when you click the reload button.
@@ -534,7 +534,7 @@ void TestShell::ResizeSubViews() {
shell->m_focusedWidgetHost = NULL;
// Make sure the previous load is stopped.
- shell->webView()->StopLoading();
+ shell->webView()->mainFrame()->stopLoading();
shell->navigation_controller()->Reset();
// Clean up state between test runs.
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 54f2a65..7ac40c0 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -514,7 +514,7 @@ void TestShell::ResizeSubViews() {
shell->m_focusedWidgetHost = NULL;
// Make sure the previous load is stopped.
- shell->webView()->StopLoading();
+ shell->webView()->mainFrame()->stopLoading();
shell->navigation_controller()->Reset();
// Clean up state between test runs.
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index f231ba0..7d2cf88 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -238,7 +238,7 @@ bool TestShell::RunFileTest(const TestParams& params) {
shell->m_focusedWidgetHost = NULL;
// Make sure the previous load is stopped.
- shell->webView()->StopLoading();
+ shell->webView()->mainFrame()->stopLoading();
shell->navigation_controller()->Reset();
// StopLoading may update state maintained in the test controller (for
@@ -547,7 +547,7 @@ LRESULT CALLBACK TestShell::WndProc(HWND hwnd, UINT message, WPARAM wParam,
if (wmId == IDC_NAV_RELOAD) {
shell->Reload();
} else {
- shell->webView()->StopLoading();
+ shell->webView()->mainFrame()->stopLoading();
}
}
break;
diff --git a/webkit/tools/test_shell/webview_host_gtk.cc b/webkit/tools/test_shell/webview_host_gtk.cc
index 21f982f..88f5a91 100644
--- a/webkit/tools/test_shell/webview_host_gtk.cc
+++ b/webkit/tools/test_shell/webview_host_gtk.cc
@@ -26,7 +26,7 @@ WebViewHost* WebViewHost::Create(GtkWidget* parent_view,
host->webwidget_ = WebView::Create(delegate);
prefs.Apply(host->webview());
- host->webview()->InitializeMainFrame(delegate);
+ host->webview()->initializeMainFrame(delegate);
host->webwidget_->layout();
return host;
diff --git a/webkit/tools/test_shell/webview_host_win.cc b/webkit/tools/test_shell/webview_host_win.cc
index 864f4d5..81ee86e 100644
--- a/webkit/tools/test_shell/webview_host_win.cc
+++ b/webkit/tools/test_shell/webview_host_win.cc
@@ -41,7 +41,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view,
host->webwidget_ = WebView::Create(delegate);
prefs.Apply(host->webview());
- host->webview()->InitializeMainFrame(delegate);
+ host->webview()->initializeMainFrame(delegate);
return host;
}