| 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/process/kill.h" | 13 #include "base/process/kill.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/supports_user_data.h" | 15 #include "base/supports_user_data.h" |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "content/public/browser/invalidate_type.h" | 17 #include "content/public/browser/invalidate_type.h" |
| 18 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
| 19 #include "content/public/browser/page_navigator.h" | 19 #include "content/public/browser/page_navigator.h" |
| 20 #include "content/public/browser/save_page_type.h" | 20 #include "content/public/browser/save_page_type.h" |
| 21 #include "content/public/browser/web_ui.h" | 21 #include "content/public/browser/web_ui.h" |
| 22 #include "content/public/common/stop_find_action.h" | 22 #include "content/public/common/stop_find_action.h" |
| 23 #include "ipc/ipc_sender.h" | 23 #include "ipc/ipc_sender.h" |
| 24 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
| 25 #include "ui/base/window_open_disposition.h" | 25 #include "ui/base/window_open_disposition.h" |
| 26 #include "ui/gfx/geometry/rect.h" | 26 #include "ui/gfx/geometry/rect.h" |
| 27 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
| 28 #include "url/origin.h" |
| 28 | 29 |
| 29 #if defined(OS_ANDROID) | 30 #if defined(OS_ANDROID) |
| 30 #include "base/android/scoped_java_ref.h" | 31 #include "base/android/scoped_java_ref.h" |
| 31 #endif | 32 #endif |
| 32 | 33 |
| 33 namespace base { | 34 namespace base { |
| 34 class DictionaryValue; | 35 class DictionaryValue; |
| 35 class TimeTicks; | 36 class TimeTicks; |
| 36 } | 37 } |
| 37 | 38 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // not guaranteed to match the current page in this WebContents. A typical | 196 // not guaranteed to match the current page in this WebContents. A typical |
| 196 // example of this is interstitials, which show the URL of the new/loading | 197 // example of this is interstitials, which show the URL of the new/loading |
| 197 // page (active) but the security context is of the old page (last committed). | 198 // page (active) but the security context is of the old page (last committed). |
| 198 virtual const GURL& GetVisibleURL() const = 0; | 199 virtual const GURL& GetVisibleURL() const = 0; |
| 199 | 200 |
| 200 // Gets the last committed URL. It represents the current page that is | 201 // Gets the last committed URL. It represents the current page that is |
| 201 // displayed in this WebContents. It represents the current security | 202 // displayed in this WebContents. It represents the current security |
| 202 // context. | 203 // context. |
| 203 virtual const GURL& GetLastCommittedURL() const = 0; | 204 virtual const GURL& GetLastCommittedURL() const = 0; |
| 204 | 205 |
| 206 // Gets the last committed origin of the main frame of WebContents. |
| 207 virtual const url::Origin& GetLastCommittedOrigin() const = 0; |
| 208 |
| 205 // Return the currently active RenderProcessHost and RenderViewHost. Each of | 209 // Return the currently active RenderProcessHost and RenderViewHost. Each of |
| 206 // these may change over time. | 210 // these may change over time. |
| 207 virtual RenderProcessHost* GetRenderProcessHost() const = 0; | 211 virtual RenderProcessHost* GetRenderProcessHost() const = 0; |
| 208 | 212 |
| 209 // Returns the main frame for the currently active view. | 213 // Returns the main frame for the currently active view. |
| 210 virtual RenderFrameHost* GetMainFrame() = 0; | 214 virtual RenderFrameHost* GetMainFrame() = 0; |
| 211 | 215 |
| 212 // Returns the focused frame for the currently active view. | 216 // Returns the focused frame for the currently active view. |
| 213 virtual RenderFrameHost* GetFocusedFrame() = 0; | 217 virtual RenderFrameHost* GetFocusedFrame() = 0; |
| 214 | 218 |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 704 |
| 701 private: | 705 private: |
| 702 // This interface should only be implemented inside content. | 706 // This interface should only be implemented inside content. |
| 703 friend class WebContentsImpl; | 707 friend class WebContentsImpl; |
| 704 WebContents() {} | 708 WebContents() {} |
| 705 }; | 709 }; |
| 706 | 710 |
| 707 } // namespace content | 711 } // namespace content |
| 708 | 712 |
| 709 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 713 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |