| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 return last_mouse_down_point_; | 160 return last_mouse_down_point_; |
| 161 } | 161 } |
| 162 | 162 |
| 163 WebCore::Frame* GetFocusedWebCoreFrame(); | 163 WebCore::Frame* GetFocusedWebCoreFrame(); |
| 164 | 164 |
| 165 // Returns the currently focused Node or NULL if no node has focus. | 165 // Returns the currently focused Node or NULL if no node has focus. |
| 166 WebCore::Node* GetFocusedNode(); | 166 WebCore::Node* GetFocusedNode(); |
| 167 | 167 |
| 168 static WebViewImpl* FromPage(WebCore::Page* page); | 168 static WebViewImpl* FromPage(WebCore::Page* page); |
| 169 | 169 |
| 170 WebKit::WebViewClient* client() { |
| 171 return delegate_; |
| 172 } |
| 173 |
| 174 // TODO(darin): Remove this method in favor of client(). |
| 170 WebViewDelegate* delegate() { | 175 WebViewDelegate* delegate() { |
| 171 return delegate_; | 176 return delegate_; |
| 172 } | 177 } |
| 173 | 178 |
| 174 // Returns the page object associated with this view. This may be NULL when | 179 // Returns the page object associated with this view. This may be NULL when |
| 175 // the page is shutting down, but will be valid at all other times. | 180 // the page is shutting down, but will be valid at all other times. |
| 176 WebCore::Page* page() const { | 181 WebCore::Page* page() const { |
| 177 return page_.get(); | 182 return page_.get(); |
| 178 } | 183 } |
| 179 | 184 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 226 |
| 222 // Set the disposition for how this webview is to be initially shown. | 227 // Set the disposition for how this webview is to be initially shown. |
| 223 void set_initial_navigation_policy(WebKit::WebNavigationPolicy policy) { | 228 void set_initial_navigation_policy(WebKit::WebNavigationPolicy policy) { |
| 224 initial_navigation_policy_ = policy; | 229 initial_navigation_policy_ = policy; |
| 225 } | 230 } |
| 226 WebKit::WebNavigationPolicy initial_navigation_policy() const { | 231 WebKit::WebNavigationPolicy initial_navigation_policy() const { |
| 227 return initial_navigation_policy_; | 232 return initial_navigation_policy_; |
| 228 } | 233 } |
| 229 | 234 |
| 230 // Start a system drag and drop operation. | 235 // Start a system drag and drop operation. |
| 231 void StartDragging(WebKit::WebPoint event_pos, | 236 void StartDragging( |
| 237 const WebKit::WebPoint& event_pos, |
| 232 const WebKit::WebDragData& drag_data, | 238 const WebKit::WebDragData& drag_data, |
| 233 WebKit::WebDragOperationsMask drag_source_operation_mask); | 239 WebKit::WebDragOperationsMask drag_source_operation_mask); |
| 234 | 240 |
| 235 // Hides the autocomplete popup if it is showing. | 241 // Hides the autocomplete popup if it is showing. |
| 236 void HideAutoCompletePopup(); | 242 void HideAutoCompletePopup(); |
| 237 | 243 |
| 238 // Converts |x|, |y| from window coordinates to contents coordinates and gets | 244 // Converts |x|, |y| from window coordinates to contents coordinates and gets |
| 239 // the underlying Node for them. | 245 // the underlying Node for them. |
| 240 WebCore::Node* GetNodeForWindowPos(int x, int y); | 246 WebCore::Node* GetNodeForWindowPos(int x, int y); |
| 241 | 247 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 static const WebKit::WebInputEvent* current_input_event() { | 418 static const WebKit::WebInputEvent* current_input_event() { |
| 413 return g_current_input_event; | 419 return g_current_input_event; |
| 414 } | 420 } |
| 415 private: | 421 private: |
| 416 static const WebKit::WebInputEvent* g_current_input_event; | 422 static const WebKit::WebInputEvent* g_current_input_event; |
| 417 | 423 |
| 418 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); | 424 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); |
| 419 }; | 425 }; |
| 420 | 426 |
| 421 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 427 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| OLD | NEW |