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/base/window_open_disposition.h" | 20 #include "ui/base/window_open_disposition.h" |
21 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
22 #include "ui/gfx/rect_f.h" | 22 #include "ui/gfx/rect_f.h" |
| 23 #include "ui/gfx/vector2d.h" |
23 | 24 |
24 class GURL; | 25 class GURL; |
25 | 26 |
26 namespace base { | 27 namespace base { |
27 class FilePath; | 28 class FilePath; |
28 class ListValue; | 29 class ListValue; |
29 } | 30 } |
30 | 31 |
31 namespace content { | 32 namespace content { |
32 class BrowserContext; | 33 class BrowserContext; |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 virtual void EnumerateDirectory(WebContents* web_contents, | 336 virtual void EnumerateDirectory(WebContents* web_contents, |
336 int request_id, | 337 int request_id, |
337 const base::FilePath& path) {} | 338 const base::FilePath& path) {} |
338 | 339 |
339 // Called when the renderer puts a tab into or out of fullscreen mode. | 340 // Called when the renderer puts a tab into or out of fullscreen mode. |
340 virtual void ToggleFullscreenModeForTab(WebContents* web_contents, | 341 virtual void ToggleFullscreenModeForTab(WebContents* web_contents, |
341 bool enter_fullscreen) {} | 342 bool enter_fullscreen) {} |
342 virtual bool IsFullscreenForTabOrPending( | 343 virtual bool IsFullscreenForTabOrPending( |
343 const WebContents* web_contents) const; | 344 const WebContents* web_contents) const; |
344 | 345 |
| 346 // Called when the renderer has scrolled programmatically. |
| 347 virtual void DidProgrammaticallyScroll(WebContents* web_contents, |
| 348 const gfx::Vector2d& scroll_point) {} |
| 349 |
345 // Called when a Javascript out of memory notification is received. | 350 // Called when a Javascript out of memory notification is received. |
346 virtual void JSOutOfMemory(WebContents* web_contents) {} | 351 virtual void JSOutOfMemory(WebContents* web_contents) {} |
347 | 352 |
348 // Register a new handler for URL requests with the given scheme. | 353 // Register a new handler for URL requests with the given scheme. |
349 // |user_gesture| is true if the registration is made in the context of a user | 354 // |user_gesture| is true if the registration is made in the context of a user |
350 // gesture. | 355 // gesture. |
351 virtual void RegisterProtocolHandler(WebContents* web_contents, | 356 virtual void RegisterProtocolHandler(WebContents* web_contents, |
352 const std::string& protocol, | 357 const std::string& protocol, |
353 const GURL& url, | 358 const GURL& url, |
354 const string16& title, | 359 const string16& title, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 // Called when |this| is no longer the WebContentsDelegate for |source|. | 433 // Called when |this| is no longer the WebContentsDelegate for |source|. |
429 void Detach(WebContents* source); | 434 void Detach(WebContents* source); |
430 | 435 |
431 // The WebContents that this is currently a delegate for. | 436 // The WebContents that this is currently a delegate for. |
432 std::set<WebContents*> attached_contents_; | 437 std::set<WebContents*> attached_contents_; |
433 }; | 438 }; |
434 | 439 |
435 } // namespace content | 440 } // namespace content |
436 | 441 |
437 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 442 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |