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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 gfx::NativeViewAccessible accessible_parent) override; | 233 gfx::NativeViewAccessible accessible_parent) override; |
234 gfx::NativeViewId GetParentForWindowlessPlugin() const override; | 234 gfx::NativeViewId GetParentForWindowlessPlugin() const override; |
235 #endif | 235 #endif |
236 | 236 |
237 // Overridden from ui::TextInputClient: | 237 // Overridden from ui::TextInputClient: |
238 void SetCompositionText(const ui::CompositionText& composition) override; | 238 void SetCompositionText(const ui::CompositionText& composition) override; |
239 void ConfirmCompositionText() override; | 239 void ConfirmCompositionText() override; |
240 void ClearCompositionText() override; | 240 void ClearCompositionText() override; |
241 void InsertText(const base::string16& text) override; | 241 void InsertText(const base::string16& text) override; |
242 void InsertChar(base::char16 ch, int flags) override; | 242 void InsertChar(base::char16 ch, int flags) override; |
243 gfx::NativeWindow GetAttachedWindow() const override; | |
244 ui::TextInputType GetTextInputType() const override; | 243 ui::TextInputType GetTextInputType() const override; |
245 ui::TextInputMode GetTextInputMode() const override; | 244 ui::TextInputMode GetTextInputMode() const override; |
246 int GetTextInputFlags() const override; | 245 int GetTextInputFlags() const override; |
247 bool CanComposeInline() const override; | 246 bool CanComposeInline() const override; |
248 gfx::Rect GetCaretBounds() const override; | 247 gfx::Rect GetCaretBounds() const override; |
249 bool GetCompositionCharacterBounds(uint32 index, | 248 bool GetCompositionCharacterBounds(uint32 index, |
250 gfx::Rect* rect) const override; | 249 gfx::Rect* rect) const override; |
251 bool HasCompositionText() const override; | 250 bool HasCompositionText() const override; |
252 bool GetTextRange(gfx::Range* range) const override; | 251 bool GetTextRange(gfx::Range* range) const override; |
253 bool GetCompositionTextRange(gfx::Range* range) const override; | 252 bool GetCompositionTextRange(gfx::Range* range) const override; |
(...skipping 14 matching lines...) Expand all Loading... |
268 void OnDisplayAdded(const gfx::Display& new_display) override; | 267 void OnDisplayAdded(const gfx::Display& new_display) override; |
269 void OnDisplayRemoved(const gfx::Display& old_display) override; | 268 void OnDisplayRemoved(const gfx::Display& old_display) override; |
270 void OnDisplayMetricsChanged(const gfx::Display& display, | 269 void OnDisplayMetricsChanged(const gfx::Display& display, |
271 uint32_t metrics) override; | 270 uint32_t metrics) override; |
272 | 271 |
273 // Overridden from aura::WindowDelegate: | 272 // Overridden from aura::WindowDelegate: |
274 gfx::Size GetMinimumSize() const override; | 273 gfx::Size GetMinimumSize() const override; |
275 gfx::Size GetMaximumSize() const override; | 274 gfx::Size GetMaximumSize() const override; |
276 void OnBoundsChanged(const gfx::Rect& old_bounds, | 275 void OnBoundsChanged(const gfx::Rect& old_bounds, |
277 const gfx::Rect& new_bounds) override; | 276 const gfx::Rect& new_bounds) override; |
278 ui::TextInputClient* GetFocusedTextInputClient() override; | |
279 gfx::NativeCursor GetCursor(const gfx::Point& point) override; | 277 gfx::NativeCursor GetCursor(const gfx::Point& point) override; |
280 int GetNonClientComponent(const gfx::Point& point) const override; | 278 int GetNonClientComponent(const gfx::Point& point) const override; |
281 bool ShouldDescendIntoChildForEventHandling( | 279 bool ShouldDescendIntoChildForEventHandling( |
282 aura::Window* child, | 280 aura::Window* child, |
283 const gfx::Point& location) override; | 281 const gfx::Point& location) override; |
284 bool CanFocus() override; | 282 bool CanFocus() override; |
285 void OnCaptureLost() override; | 283 void OnCaptureLost() override; |
286 void OnPaint(const ui::PaintContext& context) override; | 284 void OnPaint(const ui::PaintContext& context) override; |
287 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | 285 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
288 void OnWindowDestroying(aura::Window* window) override; | 286 void OnWindowDestroying(aura::Window* window) override; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 344 |
347 void SnapToPhysicalPixelBoundary(); | 345 void SnapToPhysicalPixelBoundary(); |
348 | 346 |
349 OverscrollController* overscroll_controller() const { | 347 OverscrollController* overscroll_controller() const { |
350 return overscroll_controller_.get(); | 348 return overscroll_controller_.get(); |
351 } | 349 } |
352 | 350 |
353 // Called when the context menu is about to be displayed. | 351 // Called when the context menu is about to be displayed. |
354 void OnShowContextMenu(); | 352 void OnShowContextMenu(); |
355 | 353 |
| 354 // Exposed for tests. |
| 355 aura::Window* window() { return window_; } |
| 356 |
356 protected: | 357 protected: |
357 ~RenderWidgetHostViewAura() override; | 358 ~RenderWidgetHostViewAura() override; |
358 | 359 |
359 // Exposed for tests. | |
360 aura::Window* window() { return window_; } | |
361 | |
362 DelegatedFrameHost* GetDelegatedFrameHost() const { | 360 DelegatedFrameHost* GetDelegatedFrameHost() const { |
363 return delegated_frame_host_.get(); | 361 return delegated_frame_host_.get(); |
364 } | 362 } |
365 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } | 363 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } |
366 | 364 |
367 private: | 365 private: |
368 friend class RenderWidgetHostViewAuraCopyRequestTest; | 366 friend class RenderWidgetHostViewAuraCopyRequestTest; |
369 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 367 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
370 PopupRetainsCaptureAfterMouseRelease); | 368 PopupRetainsCaptureAfterMouseRelease); |
371 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); | 369 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 | 673 |
676 BeginFrameObserverProxy begin_frame_observer_proxy_; | 674 BeginFrameObserverProxy begin_frame_observer_proxy_; |
677 | 675 |
678 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 676 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
679 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 677 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
680 }; | 678 }; |
681 | 679 |
682 } // namespace content | 680 } // namespace content |
683 | 681 |
684 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 682 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |