diff options
author | mal@chromium.org <mal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 08:43:32 +0000 |
---|---|---|
committer | mal@chromium.org <mal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 08:43:32 +0000 |
commit | 4c4d056f81e01dc743b6f1cc5773a0686759be23 (patch) | |
tree | b6245ce395c954efe0a49898cd8bc8faa1ca22c5 /webkit | |
parent | dd805fef306e6ee0d6bade640ea3689b10e64bc7 (diff) | |
download | chromium_src-4c4d056f81e01dc743b6f1cc5773a0686759be23.zip chromium_src-4c4d056f81e01dc743b6f1cc5773a0686759be23.tar.gz chromium_src-4c4d056f81e01dc743b6f1cc5773a0686759be23.tar.bz2 |
Revert 27705 - Move various methods from glue/webview.h to api/public/WebView.h
** browser_tests started failing at this revision. See:
http://build.chromium.org/buildbot/waterfall/builders/Chromium%20XP/builds/7697/steps/browser_tests/logs/stdio
**
I'll reorder the methods in webview_impl.cc in a followup 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
TBR=darin@chromium.org
Review URL: http://codereview.chromium.org/246060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/public/WebView.h | 36 | ||||
-rw-r--r-- | webkit/glue/chrome_client_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/mimetype_unittest.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 8 | ||||
-rw-r--r-- | webkit/glue/webpreferences.cc | 2 | ||||
-rw-r--r-- | webkit/glue/webview.h | 52 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 52 | ||||
-rw-r--r-- | webkit/glue/webview_impl.h | 31 | ||||
-rw-r--r-- | webkit/glue/webview_unittest.cc | 12 | ||||
-rw-r--r-- | webkit/glue/webworker_impl.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/mac/test_shell_webview.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/mac/webview_host.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_gtk.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_win.cc | 2 |
18 files changed, 139 insertions, 84 deletions
diff --git a/webkit/api/public/WebView.h b/webkit/api/public/WebView.h index 7904f95e..b91e351 100644 --- a/webkit/api/public/WebView.h +++ b/webkit/api/public/WebView.h @@ -37,7 +37,6 @@ namespace WebKit { class WebDragData; class WebFrame; - class WebFrameClient; class WebSettings; class WebString; class WebViewClient; @@ -45,16 +44,7 @@ namespace WebKit { class WebView : public WebWidget { public: - // 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; + WEBKIT_API WebView* create(WebViewClient*); // Options ------------------------------------------------------------- @@ -67,25 +57,6 @@ 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 ------------------------------------------------------------- @@ -175,11 +146,6 @@ 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 483de38..d635fb4 100644 --- a/webkit/glue/chrome_client_impl.cc +++ b/webkit/glue/chrome_client_impl.cc @@ -348,7 +348,7 @@ void ChromeClientImpl::closeWindowSoon() { webview_->page()->setGroupName(WebCore::String()); // Make sure that all loading is stopped. Ensures that JS stops executing! - webview_->mainFrame()->stopLoading(); + webview_->StopLoading(); if (webview_->client()) webview_->client()->closeWidgetSoon(); @@ -413,7 +413,7 @@ bool ChromeClientImpl::shouldInterruptJavaScript() { } bool ChromeClientImpl::tabsToLinks() const { - return webview_->tabsToLinks(); + return webview_->GetTabsToLinks(); } WebCore::IntRect ChromeClientImpl::windowResizerRect() const { diff --git a/webkit/glue/mimetype_unittest.cc b/webkit/glue/mimetype_unittest.cc index 46757f2..f55051f 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()->mainFrame()->stopLoading(); + test_shell_->webView()->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 d016bb5..e49fed8 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -1643,7 +1643,7 @@ void WebFrameImpl::CreateFrameView() { frame_->setView(view); - if (web_view->isTransparent()) + if (web_view->GetIsTransparent()) view->setTransparent(true); // TODO(darin): The Mac code has a comment about this possibly being @@ -1827,12 +1827,14 @@ void WebFrameImpl::SetMarkerActive(WebCore::Range* range, bool active) { int WebFrameImpl::OrdinalOfFirstMatchForFrame(WebFrameImpl* frame) const { int ordinal = 0; - WebFrameImpl* main_frame_impl = GetWebViewImpl()->main_frame(); + WebViewImpl* web_view = GetWebViewImpl(); + WebFrameImpl* const 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*>(it->traverseNext(true))) { + it = static_cast<WebFrameImpl*>( + web_view->GetNextFrameAfter(it, 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 df437e6..eccee6f 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 a6fa6fe..94df467 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -56,6 +56,11 @@ 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); @@ -69,10 +74,43 @@ 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, @@ -85,15 +123,29 @@ 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 cf4be81..86cca15 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,6 +370,7 @@ void WebView::ResetVisitedLinkState() { WebCore::PageGroup::pageGroup(kPageGroupName)); } + WebViewImpl::WebViewImpl(WebViewDelegate* delegate) : delegate_(delegate), ALLOW_THIS_IN_INITIALIZER_LIST(back_forward_list_client_impl_(this)), @@ -424,12 +425,7 @@ RenderTheme* WebViewImpl::theme() const { return page_.get() ? page_->theme() : RenderTheme::defaultTheme().get(); } -bool WebViewImpl::tabKeyCyclesThroughElements() const { - ASSERT(page_.get()); - return page_->tabKeyCyclesThroughElements(); -} - -void WebViewImpl::setTabKeyCyclesThroughElements(bool value) { +void WebViewImpl::SetTabKeyCyclesThroughElements(bool value) { if (page_ != NULL) { page_->setTabKeyCyclesThroughElements(value); } @@ -1611,6 +1607,30 @@ 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_; } @@ -1619,7 +1639,11 @@ void WebViewImpl::SetInspectorSettings(const std::wstring& settings) { inspector_settings_ = settings; } -bool WebViewImpl::setDropEffect(bool accept) { +void WebViewImpl::ShowJavaScriptConsole() { + page_->inspectorController()->showPanel(InspectorController::ConsolePanel); +} + +bool WebViewImpl::SetDropEffect(bool accept) { if (drag_target_dispatch_) { drop_effect_ = accept ? DROP_EFFECT_COPY : DROP_EFFECT_NONE; return true; @@ -1697,7 +1721,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) { @@ -1709,7 +1733,7 @@ void WebViewImpl::setIsTransparent(bool is_transparent) { is_transparent_ = is_transparent; } -bool WebViewImpl::isTransparent() const { +bool WebViewImpl::GetIsTransparent() const { return is_transparent_; } @@ -1744,12 +1768,12 @@ void WebViewImpl::MediaPlayerActionAt(int x, } } -void WebViewImpl::setIsActive(bool active) { +void WebViewImpl::SetActive(bool active) { if (page() && page()->focusController()) page()->focusController()->setActive(active); } -bool WebViewImpl::isActive() const { +bool WebViewImpl::IsActive() { return (page() && page()->focusController()) ? page()->focusController()->isActive() : false; @@ -1873,10 +1897,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::tabsToLinks() const { +bool WebViewImpl::GetTabsToLinks() const { return tabs_to_links_; } diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h index ca07064..0e999ec 100644 --- a/webkit/glue/webview_impl.h +++ b/webkit/glue/webview_impl.h @@ -81,18 +81,9 @@ 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(); @@ -128,25 +119,42 @@ 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 { @@ -242,6 +250,9 @@ 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 36f87c8..c3ae5c2 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->setIsActive(true); - EXPECT_TRUE(view->isActive()); + view->SetActive(true); + EXPECT_TRUE(view->IsActive()); - view->setIsActive(false); - EXPECT_FALSE(view->isActive()); + view->SetActive(false); + EXPECT_FALSE(view->IsActive()); - view->setIsActive(true); - EXPECT_TRUE(view->isActive()); + view->SetActive(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 2648341..520389a 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 a57a383..bc88eb5 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 908abde..31d5c0a 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()->mainFrame()->stopLoading(); + shell_->webView()->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 9f267a9..b27a603 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 16661d8..c9319ab 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()->mainFrame()->stopLoading(); + shell->webView()->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()->mainFrame()->stopLoading(); + shell->webView()->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 7ac40c0..54f2a65 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()->mainFrame()->stopLoading(); + shell->webView()->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 7d2cf88..f231ba0 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()->mainFrame()->stopLoading(); + shell->webView()->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()->mainFrame()->stopLoading(); + shell->webView()->StopLoading(); } } break; diff --git a/webkit/tools/test_shell/webview_host_gtk.cc b/webkit/tools/test_shell/webview_host_gtk.cc index 88f5a91..21f982f 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 81ee86e..864f4d5 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; } |