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/navigation_controller.h" | 17 #include "content/public/browser/navigation_controller.h" |
18 #include "content/public/browser/page_navigator.h" | 18 #include "content/public/browser/page_navigator.h" |
19 #include "content/public/browser/save_page_type.h" | 19 #include "content/public/browser/save_page_type.h" |
20 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
| 21 #include "content/public/common/stop_find_action.h" |
21 #include "ipc/ipc_sender.h" | 22 #include "ipc/ipc_sender.h" |
22 #include "third_party/skia/include/core/SkColor.h" | 23 #include "third_party/skia/include/core/SkColor.h" |
23 #include "ui/base/window_open_disposition.h" | 24 #include "ui/base/window_open_disposition.h" |
24 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
25 #include "ui/gfx/size.h" | 26 #include "ui/gfx/size.h" |
26 | 27 |
27 #if defined(OS_ANDROID) | 28 #if defined(OS_ANDROID) |
28 #include "base/android/scoped_java_ref.h" | 29 #include "base/android/scoped_java_ref.h" |
29 #endif | 30 #endif |
30 | 31 |
31 namespace base { | 32 namespace base { |
32 class TimeTicks; | 33 class TimeTicks; |
33 } | 34 } |
34 | 35 |
| 36 namespace blink { |
| 37 struct WebFindOptions; |
| 38 } |
| 39 |
35 namespace gfx { | 40 namespace gfx { |
36 class Rect; | 41 class Rect; |
37 class Size; | 42 class Size; |
38 } | 43 } |
39 | 44 |
40 namespace net { | 45 namespace net { |
41 struct LoadStateWithParam; | 46 struct LoadStateWithParam; |
42 } | 47 } |
43 | 48 |
44 namespace content { | 49 namespace content { |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 bool is_favicon, | 480 bool is_favicon, |
476 uint32_t max_bitmap_size, | 481 uint32_t max_bitmap_size, |
477 const ImageDownloadCallback& callback) = 0; | 482 const ImageDownloadCallback& callback) = 0; |
478 | 483 |
479 // Returns true if the WebContents is responsible for displaying a subframe | 484 // Returns true if the WebContents is responsible for displaying a subframe |
480 // in a different process from its parent page. | 485 // in a different process from its parent page. |
481 // TODO: this doesn't really belong here. With site isolation, this should be | 486 // TODO: this doesn't really belong here. With site isolation, this should be |
482 // removed since we can then embed iframes in different processes. | 487 // removed since we can then embed iframes in different processes. |
483 virtual bool IsSubframe() const = 0; | 488 virtual bool IsSubframe() const = 0; |
484 | 489 |
| 490 // Finds text on a page. |
| 491 virtual void Find(int request_id, |
| 492 const base::string16& search_text, |
| 493 const blink::WebFindOptions& options) = 0; |
| 494 |
| 495 // Notifies the renderer that the user has closed the FindInPage window |
| 496 // (and what action to take regarding the selection). |
| 497 virtual void StopFinding(StopFindAction action) = 0; |
| 498 |
485 #if defined(OS_ANDROID) | 499 #if defined(OS_ANDROID) |
486 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 500 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
487 jobject jweb_contents_android); | 501 jobject jweb_contents_android); |
488 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 502 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
489 #endif // OS_ANDROID | 503 #endif // OS_ANDROID |
490 | 504 |
491 private: | 505 private: |
492 // This interface should only be implemented inside content. | 506 // This interface should only be implemented inside content. |
493 friend class WebContentsImpl; | 507 friend class WebContentsImpl; |
494 WebContents() {} | 508 WebContents() {} |
495 }; | 509 }; |
496 | 510 |
497 } // namespace content | 511 } // namespace content |
498 | 512 |
499 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 513 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |