| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/navigation_type.h" | 15 #include "content/public/browser/navigation_type.h" |
| 16 #include "content/public/common/media_stream_request.h" | 16 #include "content/public/common/media_stream_request.h" |
| 17 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
| 18 #include "content/public/common/window_container_type.h" | 18 #include "content/public/common/window_container_type.h" |
| 19 #include "third_party/skia/include/core/SkColor.h" | 19 #include "third_party/skia/include/core/SkColor.h" |
| 20 #include "ui/gfx/native_widget_types.h" | 20 #include "ui/gfx/native_widget_types.h" |
| 21 #include "ui/gfx/rect_f.h" |
| 21 #include "webkit/glue/window_open_disposition.h" | 22 #include "webkit/glue/window_open_disposition.h" |
| 22 | 23 |
| 23 class FilePath; | 24 class FilePath; |
| 24 class GURL; | 25 class GURL; |
| 25 class WebContentsImpl; | 26 class WebContentsImpl; |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class ListValue; | 29 class ListValue; |
| 29 } | 30 } |
| 30 | 31 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // Result of string search in the page. This includes the number of matches | 388 // Result of string search in the page. This includes the number of matches |
| 388 // found and the selection rect (in screen coordinates) for the string found. | 389 // found and the selection rect (in screen coordinates) for the string found. |
| 389 // If |final_update| is false, it indicates that more results follow. | 390 // If |final_update| is false, it indicates that more results follow. |
| 390 virtual void FindReply(WebContents* web_contents, | 391 virtual void FindReply(WebContents* web_contents, |
| 391 int request_id, | 392 int request_id, |
| 392 int number_of_matches, | 393 int number_of_matches, |
| 393 const gfx::Rect& selection_rect, | 394 const gfx::Rect& selection_rect, |
| 394 int active_match_ordinal, | 395 int active_match_ordinal, |
| 395 bool final_update) {} | 396 bool final_update) {} |
| 396 | 397 |
| 398 #if defined(OS_ANDROID) |
| 399 // Provides the rects of the current find-in-page matches. |
| 400 // Sent as a reply to RequestFindMatchRects. |
| 401 virtual void FindMatchRectsReply(WebContents* web_contents, |
| 402 int version, |
| 403 const std::vector<gfx::RectF>& rects, |
| 404 const gfx::RectF& active_rect) {} |
| 405 #endif |
| 406 |
| 397 // Invoked when the preferred size of the contents has been changed. | 407 // Invoked when the preferred size of the contents has been changed. |
| 398 virtual void UpdatePreferredSize(WebContents* web_contents, | 408 virtual void UpdatePreferredSize(WebContents* web_contents, |
| 399 const gfx::Size& pref_size) {} | 409 const gfx::Size& pref_size) {} |
| 400 | 410 |
| 401 // Invoked when the contents auto-resized and the container should match it. | 411 // Invoked when the contents auto-resized and the container should match it. |
| 402 virtual void ResizeDueToAutoResize(WebContents* web_contents, | 412 virtual void ResizeDueToAutoResize(WebContents* web_contents, |
| 403 const gfx::Size& new_size) {} | 413 const gfx::Size& new_size) {} |
| 404 | 414 |
| 405 // Notification message from HTML UI. | 415 // Notification message from HTML UI. |
| 406 virtual void WebUISend(WebContents* web_contents, | 416 virtual void WebUISend(WebContents* web_contents, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 // Called when |this| is no longer the WebContentsDelegate for |source|. | 450 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 441 void Detach(WebContents* source); | 451 void Detach(WebContents* source); |
| 442 | 452 |
| 443 // The WebContents that this is currently a delegate for. | 453 // The WebContents that this is currently a delegate for. |
| 444 std::set<WebContents*> attached_contents_; | 454 std::set<WebContents*> attached_contents_; |
| 445 }; | 455 }; |
| 446 | 456 |
| 447 } // namespace content | 457 } // namespace content |
| 448 | 458 |
| 449 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 459 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |