| 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/process/kill.h" | 15 #include "base/process/kill.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "base/supports_user_data.h" | 17 #include "base/supports_user_data.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "content/public/browser/invalidate_type.h" | 20 #include "content/public/browser/invalidate_type.h" |
| 21 #include "content/public/browser/navigation_controller.h" | 21 #include "content/public/browser/navigation_controller.h" |
| 22 #include "content/public/browser/page_navigator.h" | 22 #include "content/public/browser/page_navigator.h" |
| 23 #include "content/public/browser/save_page_type.h" | 23 #include "content/public/browser/save_page_type.h" |
| 24 #include "content/public/browser/screen_orientation_delegate.h" |
| 24 #include "content/public/browser/site_instance.h" | 25 #include "content/public/browser/site_instance.h" |
| 25 #include "content/public/browser/web_ui.h" | 26 #include "content/public/browser/web_ui.h" |
| 26 #include "content/public/common/stop_find_action.h" | 27 #include "content/public/common/stop_find_action.h" |
| 27 #include "ipc/ipc_sender.h" | 28 #include "ipc/ipc_sender.h" |
| 28 #include "third_party/skia/include/core/SkColor.h" | 29 #include "third_party/skia/include/core/SkColor.h" |
| 29 #include "ui/base/window_open_disposition.h" | 30 #include "ui/base/window_open_disposition.h" |
| 30 #include "ui/gfx/geometry/rect.h" | 31 #include "ui/gfx/geometry/rect.h" |
| 31 #include "ui/gfx/native_widget_types.h" | 32 #include "ui/gfx/native_widget_types.h" |
| 32 | 33 |
| 33 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Returns the WebContents that owns the RenderViewHost, or nullptr if the | 185 // Returns the WebContents that owns the RenderViewHost, or nullptr if the |
| 185 // render view host's delegate isn't a WebContents. | 186 // render view host's delegate isn't a WebContents. |
| 186 CONTENT_EXPORT static WebContents* FromRenderViewHost(RenderViewHost* rvh); | 187 CONTENT_EXPORT static WebContents* FromRenderViewHost(RenderViewHost* rvh); |
| 187 | 188 |
| 188 CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh); | 189 CONTENT_EXPORT static WebContents* FromRenderFrameHost(RenderFrameHost* rfh); |
| 189 | 190 |
| 190 // Returns the WebContents associated with the |frame_tree_node_id|. | 191 // Returns the WebContents associated with the |frame_tree_node_id|. |
| 191 CONTENT_EXPORT static WebContents* FromFrameTreeNodeId( | 192 CONTENT_EXPORT static WebContents* FromFrameTreeNodeId( |
| 192 int frame_tree_node_id); | 193 int frame_tree_node_id); |
| 193 | 194 |
| 195 // Sets delegate for platform specific screen orientation functionality. |
| 196 CONTENT_EXPORT static void SetScreenOrientationDelegate( |
| 197 ScreenOrientationDelegate* delegate); |
| 198 |
| 194 ~WebContents() override {} | 199 ~WebContents() override {} |
| 195 | 200 |
| 196 // Intrinsic tab state ------------------------------------------------------- | 201 // Intrinsic tab state ------------------------------------------------------- |
| 197 | 202 |
| 198 // Gets/Sets the delegate. | 203 // Gets/Sets the delegate. |
| 199 virtual WebContentsDelegate* GetDelegate() = 0; | 204 virtual WebContentsDelegate* GetDelegate() = 0; |
| 200 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; | 205 virtual void SetDelegate(WebContentsDelegate* delegate) = 0; |
| 201 | 206 |
| 202 // Gets the controller for this WebContents. | 207 // Gets the controller for this WebContents. |
| 203 virtual NavigationController& GetController() = 0; | 208 virtual NavigationController& GetController() = 0; |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 | 787 |
| 783 private: | 788 private: |
| 784 // This interface should only be implemented inside content. | 789 // This interface should only be implemented inside content. |
| 785 friend class WebContentsImpl; | 790 friend class WebContentsImpl; |
| 786 WebContents() {} | 791 WebContents() {} |
| 787 }; | 792 }; |
| 788 | 793 |
| 789 } // namespace content | 794 } // namespace content |
| 790 | 795 |
| 791 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 796 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |