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_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 virtual void AddNewContents(WebContents* source, | 103 virtual void AddNewContents(WebContents* source, |
104 WebContents* new_contents, | 104 WebContents* new_contents, |
105 WindowOpenDisposition disposition, | 105 WindowOpenDisposition disposition, |
106 const gfx::Rect& initial_rect, | 106 const gfx::Rect& initial_rect, |
107 bool user_gesture, | 107 bool user_gesture, |
108 bool* was_blocked) {} | 108 bool* was_blocked) {} |
109 | 109 |
110 // Selects the specified contents, bringing its container to the front. | 110 // Selects the specified contents, bringing its container to the front. |
111 virtual void ActivateContents(WebContents* contents) {} | 111 virtual void ActivateContents(WebContents* contents) {} |
112 | 112 |
113 // Deactivates the specified contents by deactivating its container and | |
114 // potentialy moving it to the back of the Z order. | |
115 virtual void DeactivateContents(WebContents* contents) {} | |
116 | |
117 // Notifies the delegate that this contents is starting or is done loading | 113 // Notifies the delegate that this contents is starting or is done loading |
118 // some resource. The delegate should use this notification to represent | 114 // some resource. The delegate should use this notification to represent |
119 // loading feedback. See WebContents::IsLoading() | 115 // loading feedback. See WebContents::IsLoading() |
120 // |to_different_document| will be true unless the load is a fragment | 116 // |to_different_document| will be true unless the load is a fragment |
121 // navigation, or triggered by history.pushState/replaceState. | 117 // navigation, or triggered by history.pushState/replaceState. |
122 virtual void LoadingStateChanged(WebContents* source, | 118 virtual void LoadingStateChanged(WebContents* source, |
123 bool to_different_document) {} | 119 bool to_different_document) {} |
124 | 120 |
125 // Notifies the delegate that the page has made some progress loading. | 121 // Notifies the delegate that the page has made some progress loading. |
126 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully | 122 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 // Called when |this| is no longer the WebContentsDelegate for |source|. | 521 // Called when |this| is no longer the WebContentsDelegate for |source|. |
526 void Detach(WebContents* source); | 522 void Detach(WebContents* source); |
527 | 523 |
528 // The WebContents that this is currently a delegate for. | 524 // The WebContents that this is currently a delegate for. |
529 std::set<WebContents*> attached_contents_; | 525 std::set<WebContents*> attached_contents_; |
530 }; | 526 }; |
531 | 527 |
532 } // namespace content | 528 } // namespace content |
533 | 529 |
534 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 530 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |