| 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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/process_util.h" | 17 #include "base/process_util.h" |
| 18 #include "base/property_bag.h" | 18 #include "base/property_bag.h" |
| 19 #include "base/string16.h" | 19 #include "base/string16.h" |
| 20 #include "base/timer.h" | 20 #include "base/timer.h" |
| 21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 22 #include "content/common/mouse_lock.h" |
| 22 #include "content/common/view_message_enums.h" | 23 #include "content/common/view_message_enums.h" |
| 23 #include "content/public/browser/render_widget_host.h" | 24 #include "content/public/browser/render_widget_host.h" |
| 24 #include "content/public/common/page_zoom.h" | 25 #include "content/public/common/page_zoom.h" |
| 25 #include "ui/base/ime/text_input_type.h" | 26 #include "ui/base/ime/text_input_type.h" |
| 26 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 27 | 28 |
| 28 class BackingStore; | 29 class BackingStore; |
| 29 class MockRenderWidgetHost; | 30 class MockRenderWidgetHost; |
| 30 class WebCursor; | 31 class WebCursor; |
| 31 struct EditCommand; | 32 struct EditCommand; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 401 |
| 401 // Called when auto-resize resulted in the renderer size changing. | 402 // Called when auto-resize resulted in the renderer size changing. |
| 402 virtual void OnRenderAutoResized(const gfx::Size& new_size) {} | 403 virtual void OnRenderAutoResized(const gfx::Size& new_size) {} |
| 403 | 404 |
| 404 // --------------------------------------------------------------------------- | 405 // --------------------------------------------------------------------------- |
| 405 | 406 |
| 406 // RenderViewHost overrides this method to impose further restrictions on when | 407 // RenderViewHost overrides this method to impose further restrictions on when |
| 407 // to allow mouse lock. | 408 // to allow mouse lock. |
| 408 // Once the request is approved or rejected, GotResponseToLockMouseRequest() | 409 // Once the request is approved or rejected, GotResponseToLockMouseRequest() |
| 409 // will be called. | 410 // will be called. |
| 410 virtual void RequestToLockMouse(bool user_gesture); | 411 virtual void RequestToLockMouse(MouseLockSource lock_source, |
| 412 MouseUnlockSource previous_unlock_source); |
| 411 | 413 |
| 412 void RejectMouseLockOrUnlockIfNecessary(); | 414 void RejectMouseLockOrUnlockIfNecessary(); |
| 413 bool IsMouseLocked() const; | 415 bool IsMouseLocked() const; |
| 414 | 416 |
| 415 // RenderViewHost overrides this method to report when in fullscreen mode. | 417 // RenderViewHost overrides this method to report when in fullscreen mode. |
| 416 virtual bool IsFullscreen() const; | 418 virtual bool IsFullscreen() const; |
| 417 | 419 |
| 418 // Indicates if the render widget host should track the render widget's size | 420 // Indicates if the render widget host should track the render widget's size |
| 419 // as opposed to visa versa. | 421 // as opposed to visa versa. |
| 420 void SetShouldAutoResize(bool enable); | 422 void SetShouldAutoResize(bool enable); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 void OnMsgDidChangeNumTouchEvents(int count); | 478 void OnMsgDidChangeNumTouchEvents(int count); |
| 477 | 479 |
| 478 void OnMsgSetCursor(const WebCursor& cursor); | 480 void OnMsgSetCursor(const WebCursor& cursor); |
| 479 void OnMsgTextInputStateChanged(ui::TextInputType type, | 481 void OnMsgTextInputStateChanged(ui::TextInputType type, |
| 480 bool can_compose_inline); | 482 bool can_compose_inline); |
| 481 void OnMsgImeCompositionRangeChanged(const ui::Range& range); | 483 void OnMsgImeCompositionRangeChanged(const ui::Range& range); |
| 482 void OnMsgImeCancelComposition(); | 484 void OnMsgImeCancelComposition(); |
| 483 | 485 |
| 484 void OnMsgDidActivateAcceleratedCompositing(bool activated); | 486 void OnMsgDidActivateAcceleratedCompositing(bool activated); |
| 485 | 487 |
| 486 void OnMsgLockMouse(bool user_gesture); | 488 void OnMsgLockMouse(MouseLockSource lock_source, |
| 489 MouseUnlockSource previous_unlock_source); |
| 487 void OnMsgUnlockMouse(); | 490 void OnMsgUnlockMouse(); |
| 488 | 491 |
| 489 #if defined(OS_POSIX) || defined(USE_AURA) | 492 #if defined(OS_POSIX) || defined(USE_AURA) |
| 490 void OnMsgGetWindowRect(gfx::NativeViewId window_id, gfx::Rect* results); | 493 void OnMsgGetWindowRect(gfx::NativeViewId window_id, gfx::Rect* results); |
| 491 void OnMsgGetRootWindowRect(gfx::NativeViewId window_id, gfx::Rect* results); | 494 void OnMsgGetRootWindowRect(gfx::NativeViewId window_id, gfx::Rect* results); |
| 492 #endif | 495 #endif |
| 493 #if defined(OS_MACOSX) | 496 #if defined(OS_MACOSX) |
| 494 void OnMsgPluginFocusChanged(bool focused, int plugin_id); | 497 void OnMsgPluginFocusChanged(bool focused, int plugin_id); |
| 495 void OnMsgStartPluginIme(); | 498 void OnMsgStartPluginIme(); |
| 496 void OnAllocateFakePluginWindowHandle(bool opaque, | 499 void OnAllocateFakePluginWindowHandle(bool opaque, |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 720 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 718 | 721 |
| 719 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 722 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
| 720 | 723 |
| 721 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 724 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 722 }; | 725 }; |
| 723 | 726 |
| 724 } // namespace content | 727 } // namespace content |
| 725 | 728 |
| 726 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 729 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |