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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 #endif | 329 #endif |
330 | 330 |
331 // Method to indicate if this instance is shutting down or closing. | 331 // Method to indicate if this instance is shutting down or closing. |
332 // TODO(shrikant): Discuss around to see if it makes sense to add this method | 332 // TODO(shrikant): Discuss around to see if it makes sense to add this method |
333 // as part of RenderWidgetHostView. | 333 // as part of RenderWidgetHostView. |
334 bool IsClosing() const { return in_shutdown_; } | 334 bool IsClosing() const { return in_shutdown_; } |
335 | 335 |
336 // Sets whether the overscroll controller should be enabled for this page. | 336 // Sets whether the overscroll controller should be enabled for this page. |
337 void SetOverscrollControllerEnabled(bool enabled); | 337 void SetOverscrollControllerEnabled(bool enabled); |
338 | 338 |
339 void SnapToPhysicalPixelBoundary(); | |
sky
2014/07/10 16:30:45
Move implementation to match new position.
calamity
2014/07/11 03:24:23
Done.
| |
340 | |
339 OverscrollController* overscroll_controller() const { | 341 OverscrollController* overscroll_controller() const { |
340 return overscroll_controller_.get(); | 342 return overscroll_controller_.get(); |
341 } | 343 } |
342 | 344 |
343 protected: | 345 protected: |
344 virtual ~RenderWidgetHostViewAura(); | 346 virtual ~RenderWidgetHostViewAura(); |
345 | 347 |
346 // Exposed for tests. | 348 // Exposed for tests. |
347 aura::Window* window() { return window_; } | 349 aura::Window* window() { return window_; } |
348 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; | 350 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; |
(...skipping 21 matching lines...) Expand all Loading... | |
370 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 372 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
371 VisibleViewportTest); | 373 VisibleViewportTest); |
372 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 374 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
373 OverscrollResetsOnBlur); | 375 OverscrollResetsOnBlur); |
374 | 376 |
375 class WindowObserver; | 377 class WindowObserver; |
376 friend class WindowObserver; | 378 friend class WindowObserver; |
377 | 379 |
378 void UpdateCursorIfOverSelf(); | 380 void UpdateCursorIfOverSelf(); |
379 | 381 |
380 void SnapToPhysicalPixelBoundary(); | |
381 | |
382 // Set the bounds of the window and handle size changes. Assumes the caller | 382 // Set the bounds of the window and handle size changes. Assumes the caller |
383 // has already adjusted the origin of |rect| to conform to whatever coordinate | 383 // has already adjusted the origin of |rect| to conform to whatever coordinate |
384 // space is required by the aura::Window. | 384 // space is required by the aura::Window. |
385 void InternalSetBounds(const gfx::Rect& rect); | 385 void InternalSetBounds(const gfx::Rect& rect); |
386 | 386 |
387 #if defined(OS_WIN) | 387 #if defined(OS_WIN) |
388 bool UsesNativeWindowFrame() const; | 388 bool UsesNativeWindowFrame() const; |
389 #endif | 389 #endif |
390 | 390 |
391 ui::InputMethod* GetInputMethod() const; | 391 ui::InputMethod* GetInputMethod() const; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
593 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; | 593 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; |
594 | 594 |
595 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 595 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
596 | 596 |
597 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 597 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
598 }; | 598 }; |
599 | 599 |
600 } // namespace content | 600 } // namespace content |
601 | 601 |
602 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 602 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |