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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 virtual void FindReply(WebContents* tab, | 365 virtual void FindReply(WebContents* tab, |
366 int request_id, | 366 int request_id, |
367 int number_of_matches, | 367 int number_of_matches, |
368 const gfx::Rect& selection_rect, | 368 const gfx::Rect& selection_rect, |
369 int active_match_ordinal, | 369 int active_match_ordinal, |
370 bool final_update) {} | 370 bool final_update) {} |
371 | 371 |
372 // Notification that a plugin has crashed. | 372 // Notification that a plugin has crashed. |
373 virtual void CrashedPlugin(WebContents* tab, const FilePath& plugin_path) {} | 373 virtual void CrashedPlugin(WebContents* tab, const FilePath& plugin_path) {} |
374 | 374 |
| 375 // Notication that the given plugin has hung or become unhung. This |
| 376 // notification is only for Pepper plugins. |
| 377 // |
| 378 // The child_id is the unique child process ID from the plugin. Note that this |
| 379 // ID is supplied by the renderer, so should be validated before it's used |
| 380 // for anything in case there's an exploited renderer. The name will be |
| 381 // provided if it is available, otherwise name will be empty and the |
| 382 // implementation should use the patch to extract the plugin name. |
| 383 virtual void PluginHungStatusChanged(WebContents* tab, |
| 384 int plugin_child_id, |
| 385 const FilePath& plugin_path, |
| 386 bool is_hung) {} |
| 387 |
375 // Invoked when the preferred size of the contents has been changed. | 388 // Invoked when the preferred size of the contents has been changed. |
376 virtual void UpdatePreferredSize(WebContents* tab, | 389 virtual void UpdatePreferredSize(WebContents* tab, |
377 const gfx::Size& pref_size) {} | 390 const gfx::Size& pref_size) {} |
378 | 391 |
379 // Invoked when the contents auto-resized and the container should match it. | 392 // Invoked when the contents auto-resized and the container should match it. |
380 virtual void ResizeDueToAutoResize(WebContents* tab, | 393 virtual void ResizeDueToAutoResize(WebContents* tab, |
381 const gfx::Size& new_size) {} | 394 const gfx::Size& new_size) {} |
382 | 395 |
383 // Notification message from HTML UI. | 396 // Notification message from HTML UI. |
384 virtual void WebUISend(WebContents* tab, | 397 virtual void WebUISend(WebContents* tab, |
(...skipping 21 matching lines...) Expand all Loading... |
406 // Called when |this| is no longer the WebContentsDelegate for |source|. | 419 // Called when |this| is no longer the WebContentsDelegate for |source|. |
407 void Detach(WebContents* source); | 420 void Detach(WebContents* source); |
408 | 421 |
409 // The WebContents that this is currently a delegate for. | 422 // The WebContents that this is currently a delegate for. |
410 std::set<WebContents*> attached_contents_; | 423 std::set<WebContents*> attached_contents_; |
411 }; | 424 }; |
412 | 425 |
413 } // namespace content | 426 } // namespace content |
414 | 427 |
415 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 428 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |