| 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 <set> | 10 #include <set> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 struct CustomContextMenuContext; | 60 struct CustomContextMenuContext; |
| 61 struct DropData; | 61 struct DropData; |
| 62 struct Manifest; | 62 struct Manifest; |
| 63 struct PageImportanceSignals; | 63 struct PageImportanceSignals; |
| 64 struct RendererPreferences; | 64 struct RendererPreferences; |
| 65 | 65 |
| 66 // WebContents is the core class in content/. A WebContents renders web content | 66 // WebContents is the core class in content/. A WebContents renders web content |
| 67 // (usually HTML) in a rectangular area. | 67 // (usually HTML) in a rectangular area. |
| 68 // | 68 // |
| 69 // Instantiating one is simple: | 69 // Instantiating one is simple: |
| 70 // scoped_ptr<content::WebContents> web_contents( | 70 // std::unique_ptr<content::WebContents> web_contents( |
| 71 // content::WebContents::Create( | 71 // content::WebContents::Create( |
| 72 // content::WebContents::CreateParams(browser_context))); | 72 // content::WebContents::CreateParams(browser_context))); |
| 73 // gfx::NativeView view = web_contents->GetNativeView(); | 73 // gfx::NativeView view = web_contents->GetNativeView(); |
| 74 // // |view| is an HWND, NSView*, GtkWidget*, etc.; insert it into the view | 74 // // |view| is an HWND, NSView*, GtkWidget*, etc.; insert it into the view |
| 75 // // hierarchy wherever it needs to go. | 75 // // hierarchy wherever it needs to go. |
| 76 // | 76 // |
| 77 // That's it; go to your kitchen, grab a scone, and chill. WebContents will do | 77 // That's it; go to your kitchen, grab a scone, and chill. WebContents will do |
| 78 // all the multi-process stuff behind the scenes. More details are at | 78 // all the multi-process stuff behind the scenes. More details are at |
| 79 // http://www.chromium.org/developers/design-documents/multi-process-architectur
e . | 79 // http://www.chromium.org/developers/design-documents/multi-process-architectur
e |
| 80 // . |
| 80 // | 81 // |
| 81 // Each WebContents has exactly one NavigationController; each | 82 // Each WebContents has exactly one NavigationController; each |
| 82 // NavigationController belongs to one WebContents. The NavigationController can | 83 // NavigationController belongs to one WebContents. The NavigationController can |
| 83 // be obtained from GetController(), and is used to load URLs into the | 84 // be obtained from GetController(), and is used to load URLs into the |
| 84 // WebContents, navigate it backwards/forwards, etc. See navigation_controller.h | 85 // WebContents, navigate it backwards/forwards, etc. See navigation_controller.h |
| 85 // for more details. | 86 // for more details. |
| 86 class WebContents : public PageNavigator, | 87 class WebContents : public PageNavigator, |
| 87 public IPC::Sender, | 88 public IPC::Sender, |
| 88 public base::SupportsUserData { | 89 public base::SupportsUserData { |
| 89 public: | 90 public: |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 | 719 |
| 719 private: | 720 private: |
| 720 // This interface should only be implemented inside content. | 721 // This interface should only be implemented inside content. |
| 721 friend class WebContentsImpl; | 722 friend class WebContentsImpl; |
| 722 WebContents() {} | 723 WebContents() {} |
| 723 }; | 724 }; |
| 724 | 725 |
| 725 } // namespace content | 726 } // namespace content |
| 726 | 727 |
| 727 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 728 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |