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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 const WebContents* web_contents) const; | 376 const WebContents* web_contents) const; |
377 | 377 |
378 // Register a new handler for URL requests with the given scheme. | 378 // Register a new handler for URL requests with the given scheme. |
379 // |user_gesture| is true if the registration is made in the context of a user | 379 // |user_gesture| is true if the registration is made in the context of a user |
380 // gesture. | 380 // gesture. |
381 virtual void RegisterProtocolHandler(WebContents* web_contents, | 381 virtual void RegisterProtocolHandler(WebContents* web_contents, |
382 const std::string& protocol, | 382 const std::string& protocol, |
383 const GURL& url, | 383 const GURL& url, |
384 bool user_gesture) {} | 384 bool user_gesture) {} |
385 | 385 |
| 386 // Unregister the registered handler for URL requests with the given scheme. |
| 387 // |user_gesture| is true if the registration is made in the context of a user |
| 388 // gesture. |
| 389 virtual void UnregisterProtocolHandler(WebContents* web_contents, |
| 390 const std::string& protocol, |
| 391 const GURL& url, |
| 392 bool user_gesture) {} |
| 393 |
386 // Result of string search in the page. This includes the number of matches | 394 // Result of string search in the page. This includes the number of matches |
387 // found and the selection rect (in screen coordinates) for the string found. | 395 // found and the selection rect (in screen coordinates) for the string found. |
388 // If |final_update| is false, it indicates that more results follow. | 396 // If |final_update| is false, it indicates that more results follow. |
389 virtual void FindReply(WebContents* web_contents, | 397 virtual void FindReply(WebContents* web_contents, |
390 int request_id, | 398 int request_id, |
391 int number_of_matches, | 399 int number_of_matches, |
392 const gfx::Rect& selection_rect, | 400 const gfx::Rect& selection_rect, |
393 int active_match_ordinal, | 401 int active_match_ordinal, |
394 bool final_update) {} | 402 bool final_update) {} |
395 | 403 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 // Called when |this| is no longer the WebContentsDelegate for |source|. | 491 // Called when |this| is no longer the WebContentsDelegate for |source|. |
484 void Detach(WebContents* source); | 492 void Detach(WebContents* source); |
485 | 493 |
486 // The WebContents that this is currently a delegate for. | 494 // The WebContents that this is currently a delegate for. |
487 std::set<WebContents*> attached_contents_; | 495 std::set<WebContents*> attached_contents_; |
488 }; | 496 }; |
489 | 497 |
490 } // namespace content | 498 } // namespace content |
491 | 499 |
492 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 500 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |