| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/common/top_controls_state.h" | 15 #include "content/public/common/browser_controls_state.h" |
| 16 #include "ipc/ipc_sender.h" | 16 #include "ipc/ipc_sender.h" |
| 17 #include "ui/gfx/geometry/rect_f.h" | 17 #include "ui/gfx/geometry/rect_f.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 class WebElement; | 21 class WebElement; |
| 22 class WebFrame; | 22 class WebFrame; |
| 23 class WebFrameWidget; | 23 class WebFrameWidget; |
| 24 class WebLocalFrame; | 24 class WebLocalFrame; |
| 25 class WebNode; | 25 class WebNode; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // should be removed from RenderView and instead be plumbed through the | 112 // should be removed from RenderView and instead be plumbed through the |
| 113 // target frame and WebFrameTestProxy. | 113 // target frame and WebFrameTestProxy. |
| 114 virtual void SetEditCommandForNextKeyEvent(const std::string& name, | 114 virtual void SetEditCommandForNextKeyEvent(const std::string& name, |
| 115 const std::string& value) = 0; | 115 const std::string& value) = 0; |
| 116 virtual void ClearEditCommands() = 0; | 116 virtual void ClearEditCommands() = 0; |
| 117 | 117 |
| 118 // Returns |renderer_preferences_.accept_languages| value. | 118 // Returns |renderer_preferences_.accept_languages| value. |
| 119 virtual const std::string& GetAcceptLanguages() const = 0; | 119 virtual const std::string& GetAcceptLanguages() const = 0; |
| 120 | 120 |
| 121 #if defined(OS_ANDROID) | 121 #if defined(OS_ANDROID) |
| 122 virtual void UpdateTopControlsState(TopControlsState constraints, | 122 virtual void UpdateTopControlsState(BrowserControlsState constraints, |
| 123 TopControlsState current, | 123 BrowserControlsState current, |
| 124 bool animate) = 0; | 124 bool animate) = 0; |
| 125 #endif | 125 #endif |
| 126 | 126 |
| 127 // Converts the |rect| from Viewport coordinates to Window coordinates. | 127 // Converts the |rect| from Viewport coordinates to Window coordinates. |
| 128 // See blink::WebWidgetClient::convertViewportToWindow for more details. | 128 // See blink::WebWidgetClient::convertViewportToWindow for more details. |
| 129 virtual void ConvertViewportToWindowViaWidget(blink::WebRect* rect) = 0; | 129 virtual void ConvertViewportToWindowViaWidget(blink::WebRect* rect) = 0; |
| 130 | 130 |
| 131 // Returns the bounds of |element| in Window coordinates. The bounds have been | 131 // Returns the bounds of |element| in Window coordinates. The bounds have been |
| 132 // adjusted to include any transformations, including page scale. | 132 // adjusted to include any transformations, including page scale. |
| 133 // This function will update the layout if required. | 133 // This function will update the layout if required. |
| 134 virtual gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) | 134 virtual gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) |
| 135 = 0; | 135 = 0; |
| 136 | 136 |
| 137 virtual bool HasAddedInputHandler() const = 0; | 137 virtual bool HasAddedInputHandler() const = 0; |
| 138 | 138 |
| 139 protected: | 139 protected: |
| 140 ~RenderView() override {} | 140 ~RenderView() override {} |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 // This interface should only be implemented inside content. | 143 // This interface should only be implemented inside content. |
| 144 friend class RenderViewImpl; | 144 friend class RenderViewImpl; |
| 145 RenderView() {} | 145 RenderView() {} |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace content | 148 } // namespace content |
| 149 | 149 |
| 150 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 150 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |