| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Gets WebKit related preferences associated with this view. | 66 // Gets WebKit related preferences associated with this view. |
| 67 virtual WebPreferences& GetWebkitPreferences() = 0; | 67 virtual WebPreferences& GetWebkitPreferences() = 0; |
| 68 | 68 |
| 69 // Overrides the WebKit related preferences associated with this view. Note | 69 // Overrides the WebKit related preferences associated with this view. Note |
| 70 // that the browser process may update the preferences at any time. | 70 // that the browser process may update the preferences at any time. |
| 71 virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; | 71 virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; |
| 72 | 72 |
| 73 // Returns the associated WebView. May return NULL when the view is closing. | 73 // Returns the associated WebView. May return NULL when the view is closing. |
| 74 virtual blink::WebView* GetWebView() = 0; | 74 virtual blink::WebView* GetWebView() = 0; |
| 75 | 75 |
| 76 // Gets the focused element. If no such element exists then | |
| 77 // the element will be Null. | |
| 78 virtual blink::WebElement GetFocusedElement() const = 0; | |
| 79 | |
| 80 // Returns true if the parameter node is a textfield, text area, a content | 76 // Returns true if the parameter node is a textfield, text area, a content |
| 81 // editable div, or has an ARIA role of textbox. | 77 // editable div, or has an ARIA role of textbox. |
| 82 virtual bool IsEditableNode(const blink::WebNode& node) const = 0; | 78 virtual bool IsEditableNode(const blink::WebNode& node) const = 0; |
| 83 | 79 |
| 84 // Returns true if a hit test for |point| returns a descendant of |node|. | |
| 85 virtual bool NodeContainsPoint(const blink::WebNode& node, | |
| 86 const gfx::Point& point) const = 0; | |
| 87 | |
| 88 // Returns true if we should display scrollbars for the given view size and | 80 // Returns true if we should display scrollbars for the given view size and |
| 89 // false if the scrollbars should be hidden. | 81 // false if the scrollbars should be hidden. |
| 90 virtual bool ShouldDisplayScrollbars(int width, int height) const = 0; | 82 virtual bool ShouldDisplayScrollbars(int width, int height) const = 0; |
| 91 | 83 |
| 92 // Bitwise-ORed set of extra bindings that have been enabled. See | 84 // Bitwise-ORed set of extra bindings that have been enabled. See |
| 93 // BindingsPolicy for details. | 85 // BindingsPolicy for details. |
| 94 virtual int GetEnabledBindings() const = 0; | 86 virtual int GetEnabledBindings() const = 0; |
| 95 | 87 |
| 96 // Whether content state (such as form state, scroll position and page | 88 // Whether content state (such as form state, scroll position and page |
| 97 // contents) should be sent to the browser immediately. This is normally | 89 // contents) should be sent to the browser immediately. This is normally |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 124 |
| 133 private: | 125 private: |
| 134 // This interface should only be implemented inside content. | 126 // This interface should only be implemented inside content. |
| 135 friend class RenderViewImpl; | 127 friend class RenderViewImpl; |
| 136 RenderView() {} | 128 RenderView() {} |
| 137 }; | 129 }; |
| 138 | 130 |
| 139 } // namespace content | 131 } // namespace content |
| 140 | 132 |
| 141 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 133 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |