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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 339001: Minor cleanup in glue to remove some remaining base dependencies.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webpopupmenu_impl.cc ('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 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "AXObjectCache.h" 7 #include "AXObjectCache.h"
8 #include "CSSStyleSelector.h" 8 #include "CSSStyleSelector.h"
9 #include "CSSValueKeywords.h" 9 #include "CSSValueKeywords.h"
10 #include "Cursor.h" 10 #include "Cursor.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "webkit/api/public/WebInputEvent.h" 61 #include "webkit/api/public/WebInputEvent.h"
62 #include "webkit/api/public/WebMediaPlayerAction.h" 62 #include "webkit/api/public/WebMediaPlayerAction.h"
63 #include "webkit/api/public/WebPoint.h" 63 #include "webkit/api/public/WebPoint.h"
64 #include "webkit/api/public/WebRect.h" 64 #include "webkit/api/public/WebRect.h"
65 #include "webkit/api/public/WebString.h" 65 #include "webkit/api/public/WebString.h"
66 #include "webkit/api/public/WebVector.h" 66 #include "webkit/api/public/WebVector.h"
67 #include "webkit/api/public/WebViewClient.h" 67 #include "webkit/api/public/WebViewClient.h"
68 #include "webkit/api/src/DOMUtilitiesPrivate.h" 68 #include "webkit/api/src/DOMUtilitiesPrivate.h"
69 #include "webkit/api/src/WebInputEventConversion.h" 69 #include "webkit/api/src/WebInputEventConversion.h"
70 #include "webkit/api/src/WebSettingsImpl.h" 70 #include "webkit/api/src/WebSettingsImpl.h"
71 #include "webkit/glue/glue_serialize.h"
72 #include "webkit/glue/glue_util.h" 71 #include "webkit/glue/glue_util.h"
73 #include "webkit/glue/webdevtoolsagent_impl.h" 72 #include "webkit/glue/webdevtoolsagent_impl.h"
74 #include "webkit/glue/webkit_glue.h" 73 #include "webkit/glue/webkit_glue.h"
75 #include "webkit/glue/webpopupmenu_impl.h" 74 #include "webkit/glue/webpopupmenu_impl.h"
76 #include "webkit/glue/webview_impl.h" 75 #include "webkit/glue/webview_impl.h"
77 76
78 // Get rid of WTF's pow define so we can use std::pow. 77 // Get rid of WTF's pow define so we can use std::pow.
79 #undef pow 78 #undef pow
80 #include <cmath> // for std::pow 79 #include <cmath> // for std::pow
81 80
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 } 934 }
936 return scroll_handled; 935 return scroll_handled;
937 } 936 }
938 937
939 Frame* WebViewImpl::GetFocusedWebCoreFrame() { 938 Frame* WebViewImpl::GetFocusedWebCoreFrame() {
940 return page_.get() ? page_->focusController()->focusedOrMainFrame() : NULL; 939 return page_.get() ? page_->focusController()->focusedOrMainFrame() : NULL;
941 } 940 }
942 941
943 // static 942 // static
944 WebViewImpl* WebViewImpl::FromPage(WebCore::Page* page) { 943 WebViewImpl* WebViewImpl::FromPage(WebCore::Page* page) {
945 return WebFrameImpl::FromFrame(page->mainFrame())->GetWebViewImpl(); 944 if (!page)
945 return NULL;
946
947 return static_cast<ChromeClientImpl*>(page->chrome()->client())->webview();
946 } 948 }
947 949
948 // WebWidget ------------------------------------------------------------------ 950 // WebWidget ------------------------------------------------------------------
949 951
950 void WebViewImpl::close() { 952 void WebViewImpl::close() {
951 RefPtr<WebFrameImpl> main_frame; 953 RefPtr<WebFrameImpl> main_frame;
952 954
953 if (page_.get()) { 955 if (page_.get()) {
954 // Initiate shutdown for the entire frameset. This will cause a lot of 956 // Initiate shutdown for the entire frameset. This will cause a lot of
955 // notifications to be sent. 957 // notifications to be sent.
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 hitTestResultAtPoint(doc_point, false); 1913 hitTestResultAtPoint(doc_point, false);
1912 } 1914 }
1913 1915
1914 void WebViewImpl::setTabsToLinks(bool enable) { 1916 void WebViewImpl::setTabsToLinks(bool enable) {
1915 tabs_to_links_ = enable; 1917 tabs_to_links_ = enable;
1916 } 1918 }
1917 1919
1918 bool WebViewImpl::tabsToLinks() const { 1920 bool WebViewImpl::tabsToLinks() const {
1919 return tabs_to_links_; 1921 return tabs_to_links_;
1920 } 1922 }
OLDNEW
« no previous file with comments | « webkit/glue/webpopupmenu_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698