| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 // auto-detect, http header, meta, bom detection, etc). | 354 // auto-detect, http header, meta, bom detection, etc). |
| 355 virtual void SetOverrideEncoding(const std::string& encoding) = 0; | 355 virtual void SetOverrideEncoding(const std::string& encoding) = 0; |
| 356 | 356 |
| 357 // Remove any user-defined override encoding and reload by sending down | 357 // Remove any user-defined override encoding and reload by sending down |
| 358 // ViewMsg_ResetPageEncodingToDefault to the renderer. | 358 // ViewMsg_ResetPageEncodingToDefault to the renderer. |
| 359 virtual void ResetOverrideEncoding() = 0; | 359 virtual void ResetOverrideEncoding() = 0; |
| 360 | 360 |
| 361 // Returns the settings which get passed to the renderer. | 361 // Returns the settings which get passed to the renderer. |
| 362 virtual content::RendererPreferences* GetMutableRendererPrefs() = 0; | 362 virtual content::RendererPreferences* GetMutableRendererPrefs() = 0; |
| 363 | 363 |
| 364 // Set the time when we started to create the new tab page. This time is | |
| 365 // from before we created this WebContents. | |
| 366 virtual void SetNewTabStartTime(const base::TimeTicks& time) = 0; | |
| 367 virtual base::TimeTicks GetNewTabStartTime() const = 0; | |
| 368 | |
| 369 // Tells the tab to close now. The tab will take care not to close until it's | 364 // Tells the tab to close now. The tab will take care not to close until it's |
| 370 // out of nested message loops. | 365 // out of nested message loops. |
| 371 virtual void Close() = 0; | 366 virtual void Close() = 0; |
| 372 | 367 |
| 373 // Notification that tab closing has started. This can be called multiple | |
| 374 // times, subsequent calls are ignored. | |
| 375 virtual void OnCloseStarted() = 0; | |
| 376 | |
| 377 // Notification that tab closing was cancelled. This can happen when a user | |
| 378 // cancels a window close via another tab's beforeunload dialog. | |
| 379 virtual void OnCloseCanceled() = 0; | |
| 380 | |
| 381 // Set the time during close when unload is started. Normally, this is set | |
| 382 // after the beforeunload dialog. However, for a window close, it is set | |
| 383 // after all the beforeunload dialogs have finished. | |
| 384 virtual void OnUnloadStarted() = 0; | |
| 385 | |
| 386 // Set the time during close when the tab is no longer visible. | |
| 387 virtual void OnUnloadDetachedStarted() = 0; | |
| 388 | |
| 389 // A render view-originated drag has ended. Informs the render view host and | 368 // A render view-originated drag has ended. Informs the render view host and |
| 390 // WebContentsDelegate. | 369 // WebContentsDelegate. |
| 391 virtual void SystemDragEnded() = 0; | 370 virtual void SystemDragEnded() = 0; |
| 392 | 371 |
| 393 // Notification the user has made a gesture while focus was on the | 372 // Notification the user has made a gesture while focus was on the |
| 394 // page. This is used to avoid uninitiated user downloads (aka carpet | 373 // page. This is used to avoid uninitiated user downloads (aka carpet |
| 395 // bombing), see DownloadRequestLimiter for details. | 374 // bombing), see DownloadRequestLimiter for details. |
| 396 virtual void UserGestureDone() = 0; | 375 virtual void UserGestureDone() = 0; |
| 397 | 376 |
| 398 // Indicates if this tab was explicitly closed by the user (control-w, close | 377 // Indicates if this tab was explicitly closed by the user (control-w, close |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 444 |
| 466 private: | 445 private: |
| 467 // This interface should only be implemented inside content. | 446 // This interface should only be implemented inside content. |
| 468 friend class WebContentsImpl; | 447 friend class WebContentsImpl; |
| 469 WebContents() {} | 448 WebContents() {} |
| 470 }; | 449 }; |
| 471 | 450 |
| 472 } // namespace content | 451 } // namespace content |
| 473 | 452 |
| 474 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 453 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |