| 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "content/common/content_export.h" | 24 #include "content/common/content_export.h" |
| 25 #include "content/common/input/input_event_ack_state.h" | 25 #include "content/common/input/input_event_ack_state.h" |
| 26 #include "content/public/browser/readback_types.h" | 26 #include "content/public/browser/readback_types.h" |
| 27 #include "content/public/browser/render_widget_host_view.h" | 27 #include "content/public/browser/render_widget_host_view.h" |
| 28 #include "ipc/ipc_listener.h" | 28 #include "ipc/ipc_listener.h" |
| 29 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" | 29 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
| 30 #include "third_party/WebKit/public/web/WebPopupType.h" | 30 #include "third_party/WebKit/public/web/WebPopupType.h" |
| 31 #include "third_party/WebKit/public/web/WebTextDirection.h" | 31 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 32 #include "ui/base/ime/text_input_mode.h" | 32 #include "ui/base/ime/text_input_mode.h" |
| 33 #include "ui/base/ime/text_input_type.h" | 33 #include "ui/base/ime/text_input_type.h" |
| 34 #include "ui/gfx/display.h" | 34 #include "ui/display/display.h" |
| 35 #include "ui/gfx/geometry/rect.h" | 35 #include "ui/gfx/geometry/rect.h" |
| 36 #include "ui/gfx/native_widget_types.h" | 36 #include "ui/gfx/native_widget_types.h" |
| 37 #include "ui/gfx/range/range.h" | 37 #include "ui/gfx/range/range.h" |
| 38 #include "ui/surface/transport_dib.h" | 38 #include "ui/surface/transport_dib.h" |
| 39 | 39 |
| 40 class SkBitmap; | 40 class SkBitmap; |
| 41 | 41 |
| 42 struct AccessibilityHostMsg_EventParams; | 42 struct AccessibilityHostMsg_EventParams; |
| 43 struct ViewHostMsg_SelectionBounds_Params; | 43 struct ViewHostMsg_SelectionBounds_Params; |
| 44 | 44 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). | 326 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). |
| 327 virtual bool CanCopyToVideoFrame() const = 0; | 327 virtual bool CanCopyToVideoFrame() const = 0; |
| 328 | 328 |
| 329 // Return true if the view has an accelerated surface that contains the last | 329 // Return true if the view has an accelerated surface that contains the last |
| 330 // presented frame for the view. If |desired_size| is non-empty, true is | 330 // presented frame for the view. If |desired_size| is non-empty, true is |
| 331 // returned only if the accelerated surface size matches. | 331 // returned only if the accelerated surface size matches. |
| 332 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; | 332 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; |
| 333 | 333 |
| 334 // Compute the orientation type of the display assuming it is a mobile device. | 334 // Compute the orientation type of the display assuming it is a mobile device. |
| 335 static blink::WebScreenOrientationType GetOrientationTypeForMobile( | 335 static blink::WebScreenOrientationType GetOrientationTypeForMobile( |
| 336 const gfx::Display& display); | 336 const display::Display& display); |
| 337 | 337 |
| 338 // Compute the orientation type of the display assuming it is a desktop. | 338 // Compute the orientation type of the display assuming it is a desktop. |
| 339 static blink::WebScreenOrientationType GetOrientationTypeForDesktop( | 339 static blink::WebScreenOrientationType GetOrientationTypeForDesktop( |
| 340 const gfx::Display& display); | 340 const display::Display& display); |
| 341 | 341 |
| 342 virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0; | 342 virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0; |
| 343 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; | 343 virtual bool GetScreenColorProfile(std::vector<char>* color_profile) = 0; |
| 344 | 344 |
| 345 // Gets the bounds of the window, in screen coordinates. | 345 // Gets the bounds of the window, in screen coordinates. |
| 346 virtual gfx::Rect GetBoundsInRootWindow() = 0; | 346 virtual gfx::Rect GetBoundsInRootWindow() = 0; |
| 347 | 347 |
| 348 // Called by the RenderFrameHost when it receives an IPC response to a | 348 // Called by the RenderFrameHost when it receives an IPC response to a |
| 349 // TextSurroundingSelectionRequest. | 349 // TextSurroundingSelectionRequest. |
| 350 virtual void OnTextSurroundingSelectionResponse(const base::string16& content, | 350 virtual void OnTextSurroundingSelectionResponse(const base::string16& content, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 size_t selection_text_offset_; | 410 size_t selection_text_offset_; |
| 411 | 411 |
| 412 // The current selection range relative to the start of the web page. | 412 // The current selection range relative to the start of the web page. |
| 413 gfx::Range selection_range_; | 413 gfx::Range selection_range_; |
| 414 | 414 |
| 415 protected: | 415 protected: |
| 416 // The scale factor of the display the renderer is currently on. | 416 // The scale factor of the display the renderer is currently on. |
| 417 float current_device_scale_factor_; | 417 float current_device_scale_factor_; |
| 418 | 418 |
| 419 // The orientation of the display the renderer is currently on. | 419 // The orientation of the display the renderer is currently on. |
| 420 gfx::Display::Rotation current_display_rotation_; | 420 display::Display::Rotation current_display_rotation_; |
| 421 | 421 |
| 422 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the | 422 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the |
| 423 // renderer. | 423 // renderer. |
| 424 bool pinch_zoom_enabled_; | 424 bool pinch_zoom_enabled_; |
| 425 | 425 |
| 426 private: | 426 private: |
| 427 void FlushInput(); | 427 void FlushInput(); |
| 428 | 428 |
| 429 gfx::Rect current_display_area_; | 429 gfx::Rect current_display_area_; |
| 430 | 430 |
| 431 uint32_t renderer_frame_number_; | 431 uint32_t renderer_frame_number_; |
| 432 | 432 |
| 433 base::OneShotTimer flush_input_timer_; | 433 base::OneShotTimer flush_input_timer_; |
| 434 | 434 |
| 435 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 435 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 436 | 436 |
| 437 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 437 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 438 | 438 |
| 439 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 439 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 440 }; | 440 }; |
| 441 | 441 |
| 442 } // namespace content | 442 } // namespace content |
| 443 | 443 |
| 444 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 444 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |