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/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/browser/bluetooth_chooser.h" |
15 #include "content/public/browser/invalidate_type.h" | 16 #include "content/public/browser/invalidate_type.h" |
16 #include "content/public/browser/navigation_type.h" | 17 #include "content/public/browser/navigation_type.h" |
17 #include "content/public/common/media_stream_request.h" | 18 #include "content/public/common/media_stream_request.h" |
18 #include "content/public/common/security_style.h" | 19 #include "content/public/common/security_style.h" |
19 #include "content/public/common/window_container_type.h" | 20 #include "content/public/common/window_container_type.h" |
20 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 21 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
21 #include "third_party/WebKit/public/web/WebDragOperation.h" | 22 #include "third_party/WebKit/public/web/WebDragOperation.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/geometry/rect_f.h" | 25 #include "ui/gfx/geometry/rect_f.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 virtual void RunFileChooser(WebContents* web_contents, | 336 virtual void RunFileChooser(WebContents* web_contents, |
336 const FileChooserParams& params) {} | 337 const FileChooserParams& params) {} |
337 | 338 |
338 // Request to enumerate a directory. This is equivalent to running the file | 339 // Request to enumerate a directory. This is equivalent to running the file |
339 // chooser in directory-enumeration mode and having the user select the given | 340 // chooser in directory-enumeration mode and having the user select the given |
340 // directory. | 341 // directory. |
341 virtual void EnumerateDirectory(WebContents* web_contents, | 342 virtual void EnumerateDirectory(WebContents* web_contents, |
342 int request_id, | 343 int request_id, |
343 const base::FilePath& path) {} | 344 const base::FilePath& path) {} |
344 | 345 |
| 346 // Shows a chooser for the user to select a nearby Bluetooth device. The |
| 347 // observer must live at least as long as the returned chooser object. |
| 348 virtual scoped_ptr<BluetoothChooser> RunBluetoothChooser( |
| 349 WebContents* web_contents, |
| 350 const BluetoothChooser::EventHandler& event_handler, |
| 351 const GURL& origin); |
| 352 |
345 // Returns true if the delegate will embed a WebContents-owned fullscreen | 353 // Returns true if the delegate will embed a WebContents-owned fullscreen |
346 // render widget. In this case, the delegate may access the widget by calling | 354 // render widget. In this case, the delegate may access the widget by calling |
347 // WebContents::GetFullscreenRenderWidgetHostView(). If false is returned, | 355 // WebContents::GetFullscreenRenderWidgetHostView(). If false is returned, |
348 // WebContents will be responsible for showing the fullscreen widget. | 356 // WebContents will be responsible for showing the fullscreen widget. |
349 virtual bool EmbedsFullscreenWidget() const; | 357 virtual bool EmbedsFullscreenWidget() const; |
350 | 358 |
351 // Called when the renderer puts a tab into fullscreen mode. | 359 // Called when the renderer puts a tab into fullscreen mode. |
352 // |origin| is the origin of the initiating frame inside the |web_contents|. | 360 // |origin| is the origin of the initiating frame inside the |web_contents|. |
353 // |origin| can be empty in which case the |web_contents| last committed | 361 // |origin| can be empty in which case the |web_contents| last committed |
354 // URL's origin should be used. | 362 // URL's origin should be used. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 // Called when |this| is no longer the WebContentsDelegate for |source|. | 512 // Called when |this| is no longer the WebContentsDelegate for |source|. |
505 void Detach(WebContents* source); | 513 void Detach(WebContents* source); |
506 | 514 |
507 // The WebContents that this is currently a delegate for. | 515 // The WebContents that this is currently a delegate for. |
508 std::set<WebContents*> attached_contents_; | 516 std::set<WebContents*> attached_contents_; |
509 }; | 517 }; |
510 | 518 |
511 } // namespace content | 519 } // namespace content |
512 | 520 |
513 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 521 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |