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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 336313011: Android: compute screen orientation type in the RWHV. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_fullscreen
Patch Set: fix mac build Created 6 years, 6 months 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
OLDNEW
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 #if defined(OS_MACOSX) 8 #if defined(OS_MACOSX)
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 #endif 10 #endif
11 11
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
17 #include "base/process/kill.h" 17 #include "base/process/kill.h"
18 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
19 #include "cc/output/compositor_frame.h" 19 #include "cc/output/compositor_frame.h"
20 #include "content/browser/renderer_host/event_with_latency_info.h" 20 #include "content/browser/renderer_host/event_with_latency_info.h"
21 #include "content/common/content_export.h" 21 #include "content/common/content_export.h"
22 #include "content/common/input/input_event_ack_state.h" 22 #include "content/common/input/input_event_ack_state.h"
23 #include "content/public/browser/render_widget_host_view.h" 23 #include "content/public/browser/render_widget_host_view.h"
24 #include "ipc/ipc_listener.h" 24 #include "ipc/ipc_listener.h"
25 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
25 #include "third_party/WebKit/public/web/WebPopupType.h" 26 #include "third_party/WebKit/public/web/WebPopupType.h"
26 #include "third_party/WebKit/public/web/WebTextDirection.h" 27 #include "third_party/WebKit/public/web/WebTextDirection.h"
27 #include "ui/base/ime/text_input_mode.h" 28 #include "ui/base/ime/text_input_mode.h"
28 #include "ui/base/ime/text_input_type.h" 29 #include "ui/base/ime/text_input_type.h"
29 #include "ui/gfx/display.h" 30 #include "ui/gfx/display.h"
30 #include "ui/gfx/native_widget_types.h" 31 #include "ui/gfx/native_widget_types.h"
31 #include "ui/gfx/range/range.h" 32 #include "ui/gfx/range/range.h"
32 #include "ui/gfx/rect.h" 33 #include "ui/gfx/rect.h"
33 #include "ui/surface/transport_dib.h" 34 #include "ui/surface/transport_dib.h"
34 35
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // next swap buffers or post sub buffer. 302 // next swap buffers or post sub buffer.
302 virtual void AcceleratedSurfaceSuspend() = 0; 303 virtual void AcceleratedSurfaceSuspend() = 0;
303 304
304 virtual void AcceleratedSurfaceRelease() = 0; 305 virtual void AcceleratedSurfaceRelease() = 0;
305 306
306 // Return true if the view has an accelerated surface that contains the last 307 // Return true if the view has an accelerated surface that contains the last
307 // presented frame for the view. If |desired_size| is non-empty, true is 308 // presented frame for the view. If |desired_size| is non-empty, true is
308 // returned only if the accelerated surface size matches. 309 // returned only if the accelerated surface size matches.
309 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0; 310 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) = 0;
310 311
312 // Returns the orientation type based on the current display state.
313 static blink::WebScreenOrientationType GetOrientationTypeFromDisplay(
314 const gfx::Display& display);
315
311 virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0; 316 virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0;
312 317
313 // Gets the bounds of the window, in screen coordinates. 318 // Gets the bounds of the window, in screen coordinates.
314 virtual gfx::Rect GetBoundsInRootWindow() = 0; 319 virtual gfx::Rect GetBoundsInRootWindow() = 0;
315 320
316 virtual gfx::GLSurfaceHandle GetCompositingSurface() = 0; 321 virtual gfx::GLSurfaceHandle GetCompositingSurface() = 0;
317 322
318 virtual void OnTextSurroundingSelectionResponse(const base::string16& content, 323 virtual void OnTextSurroundingSelectionResponse(const base::string16& content,
319 size_t start_offset, 324 size_t start_offset,
320 size_t end_offset) {}; 325 size_t end_offset) {};
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 uint32 renderer_frame_number_; 430 uint32 renderer_frame_number_;
426 431
427 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; 432 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_;
428 433
429 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 434 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
430 }; 435 };
431 436
432 } // namespace content 437 } // namespace content
433 438
434 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 439 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698