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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 namespace content { | 31 namespace content { |
32 class BrowserContext; | 32 class BrowserContext; |
33 class ColorChooser; | 33 class ColorChooser; |
34 class DownloadItem; | 34 class DownloadItem; |
35 class JavaScriptDialogCreator; | 35 class JavaScriptDialogCreator; |
36 class RenderViewHost; | 36 class RenderViewHost; |
37 class WebContents; | 37 class WebContents; |
38 class WebIntentsDispatcher; | 38 class WebIntentsDispatcher; |
39 struct ContextMenuParams; | 39 struct ContextMenuParams; |
| 40 struct DraggableRegion; |
40 struct FileChooserParams; | 41 struct FileChooserParams; |
41 struct NativeWebKeyboardEvent; | 42 struct NativeWebKeyboardEvent; |
42 struct SSLStatus; | 43 struct SSLStatus; |
43 } | 44 } |
44 | 45 |
45 namespace gfx { | 46 namespace gfx { |
46 class Point; | 47 class Point; |
47 class Rect; | 48 class Rect; |
48 class Size; | 49 class Size; |
49 } | 50 } |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 // Asks permission to use the camera and/or microphone. If permission is | 412 // Asks permission to use the camera and/or microphone. If permission is |
412 // granted, a call should be made to |callback| with the devices. If the | 413 // granted, a call should be made to |callback| with the devices. If the |
413 // request is denied, a call should be made to |callback| with an empty list | 414 // request is denied, a call should be made to |callback| with an empty list |
414 // of devices. |request| has the details of the request (e.g. which of audio | 415 // of devices. |request| has the details of the request (e.g. which of audio |
415 // and/or video devices are requested, and lists of available devices). | 416 // and/or video devices are requested, and lists of available devices). |
416 virtual void RequestMediaAccessPermission( | 417 virtual void RequestMediaAccessPermission( |
417 WebContents* web_contents, | 418 WebContents* web_contents, |
418 const MediaStreamRequest* request, | 419 const MediaStreamRequest* request, |
419 const MediaResponseCallback& callback) {} | 420 const MediaResponseCallback& callback) {} |
420 | 421 |
| 422 // Invoked when the draggable regions have been changed. |
| 423 virtual void UpdateDraggableRegions( |
| 424 const std::vector<content::DraggableRegion>& regions) {}; |
| 425 |
421 protected: | 426 protected: |
422 virtual ~WebContentsDelegate(); | 427 virtual ~WebContentsDelegate(); |
423 | 428 |
424 private: | 429 private: |
425 friend class ::WebContentsImpl; | 430 friend class ::WebContentsImpl; |
426 | 431 |
427 // Called when |this| becomes the WebContentsDelegate for |source|. | 432 // Called when |this| becomes the WebContentsDelegate for |source|. |
428 void Attach(WebContents* source); | 433 void Attach(WebContents* source); |
429 | 434 |
430 // Called when |this| is no longer the WebContentsDelegate for |source|. | 435 // Called when |this| is no longer the WebContentsDelegate for |source|. |
431 void Detach(WebContents* source); | 436 void Detach(WebContents* source); |
432 | 437 |
433 // The WebContents that this is currently a delegate for. | 438 // The WebContents that this is currently a delegate for. |
434 std::set<WebContents*> attached_contents_; | 439 std::set<WebContents*> attached_contents_; |
435 }; | 440 }; |
436 | 441 |
437 } // namespace content | 442 } // namespace content |
438 | 443 |
439 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 444 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |