| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_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/process_util.h" | 16 #include "base/process_util.h" |
| 17 #include "base/property_bag.h" |
| 17 #include "base/string16.h" | 18 #include "base/string16.h" |
| 18 #include "base/timer.h" | 19 #include "base/timer.h" |
| 19 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 20 #include "content/common/property_bag.h" | |
| 21 #include "content/public/browser/native_web_keyboard_event.h" | 21 #include "content/public/browser/native_web_keyboard_event.h" |
| 22 #include "content/public/common/page_zoom.h" | 22 #include "content/public/common/page_zoom.h" |
| 23 #include "ipc/ipc_channel.h" | 23 #include "ipc/ipc_channel.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
| 26 #include "ui/base/ime/text_input_type.h" | 26 #include "ui/base/ime/text_input_type.h" |
| 27 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 28 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
| 29 #include "ui/gfx/size.h" | 29 #include "ui/gfx/size.h" |
| 30 #include "ui/gfx/surface/transport_dib.h" | 30 #include "ui/gfx/surface/transport_dib.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 content::RenderProcessHost* process() const { return process_; } | 160 content::RenderProcessHost* process() const { return process_; } |
| 161 int routing_id() const { return routing_id_; } | 161 int routing_id() const { return routing_id_; } |
| 162 bool renderer_accessible() { return renderer_accessible_; } | 162 bool renderer_accessible() { return renderer_accessible_; } |
| 163 | 163 |
| 164 bool empty() const { return current_size_.IsEmpty(); } | 164 bool empty() const { return current_size_.IsEmpty(); } |
| 165 | 165 |
| 166 // Returns the property bag for this widget, where callers can add extra data | 166 // Returns the property bag for this widget, where callers can add extra data |
| 167 // they may wish to associate with it. Returns a pointer rather than a | 167 // they may wish to associate with it. Returns a pointer rather than a |
| 168 // reference since the PropertyAccessors expect this. | 168 // reference since the PropertyAccessors expect this. |
| 169 const PropertyBag* property_bag() const { return &property_bag_; } | 169 const base::PropertyBag* property_bag() const { return &property_bag_; } |
| 170 PropertyBag* property_bag() { return &property_bag_; } | 170 base::PropertyBag* property_bag() { return &property_bag_; } |
| 171 | 171 |
| 172 // Called when a renderer object already been created for this host, and we | 172 // Called when a renderer object already been created for this host, and we |
| 173 // just need to be attached to it. Used for window.open, <select> dropdown | 173 // just need to be attached to it. Used for window.open, <select> dropdown |
| 174 // menus, and other times when the renderer initiates creating an object. | 174 // menus, and other times when the renderer initiates creating an object. |
| 175 void Init(); | 175 void Init(); |
| 176 | 176 |
| 177 // Tells the renderer to die and then calls Destroy(). | 177 // Tells the renderer to die and then calls Destroy(). |
| 178 virtual void Shutdown(); | 178 virtual void Shutdown(); |
| 179 | 179 |
| 180 // Manual RTTI FTW. We are not hosting a web page. | 180 // Manual RTTI FTW. We are not hosting a web page. |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 // render_view_host_ lives on to load another URL (creating a new View while | 624 // render_view_host_ lives on to load another URL (creating a new View while |
| 625 // doing so). | 625 // doing so). |
| 626 RenderWidgetHostView* view_; | 626 RenderWidgetHostView* view_; |
| 627 | 627 |
| 628 // Created during construction but initialized during Init*(). Therefore, it | 628 // Created during construction but initialized during Init*(). Therefore, it |
| 629 // is guaranteed never to be NULL, but its channel may be NULL if the | 629 // is guaranteed never to be NULL, but its channel may be NULL if the |
| 630 // renderer crashed, so you must always check that. | 630 // renderer crashed, so you must always check that. |
| 631 content::RenderProcessHost* process_; | 631 content::RenderProcessHost* process_; |
| 632 | 632 |
| 633 // Stores random bits of data for others to associate with this object. | 633 // Stores random bits of data for others to associate with this object. |
| 634 PropertyBag property_bag_; | 634 base::PropertyBag property_bag_; |
| 635 | 635 |
| 636 // The ID of the corresponding object in the Renderer Instance. | 636 // The ID of the corresponding object in the Renderer Instance. |
| 637 int routing_id_; | 637 int routing_id_; |
| 638 | 638 |
| 639 // Indicates whether a page is loading or not. | 639 // Indicates whether a page is loading or not. |
| 640 bool is_loading_; | 640 bool is_loading_; |
| 641 | 641 |
| 642 // Indicates whether a page is hidden or not. | 642 // Indicates whether a page is hidden or not. |
| 643 bool is_hidden_; | 643 bool is_hidden_; |
| 644 | 644 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 gfx::Point last_scroll_offset_; | 777 gfx::Point last_scroll_offset_; |
| 778 | 778 |
| 779 bool pending_mouse_lock_request_; | 779 bool pending_mouse_lock_request_; |
| 780 | 780 |
| 781 base::WeakPtrFactory<RenderWidgetHost> weak_factory_; | 781 base::WeakPtrFactory<RenderWidgetHost> weak_factory_; |
| 782 | 782 |
| 783 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 783 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
| 784 }; | 784 }; |
| 785 | 785 |
| 786 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 786 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |