| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // Prepare for saving the current web page to disk. | 325 // Prepare for saving the current web page to disk. |
| 326 virtual void OnSavePage() = 0; | 326 virtual void OnSavePage() = 0; |
| 327 | 327 |
| 328 // Save page with the main HTML file path, the directory for saving resources, | 328 // Save page with the main HTML file path, the directory for saving resources, |
| 329 // and the save type: HTML only or complete web page. Returns true if the | 329 // and the save type: HTML only or complete web page. Returns true if the |
| 330 // saving process has been initiated successfully. | 330 // saving process has been initiated successfully. |
| 331 virtual bool SavePage(const base::FilePath& main_file, | 331 virtual bool SavePage(const base::FilePath& main_file, |
| 332 const base::FilePath& dir_path, | 332 const base::FilePath& dir_path, |
| 333 SavePageType save_type) = 0; | 333 SavePageType save_type) = 0; |
| 334 | 334 |
| 335 // Saves the given frame's URL to the local filesystem.. |
| 336 virtual void SaveFrame(const GURL& url, |
| 337 const Referrer& referrer) = 0; |
| 338 |
| 335 // Generate an MHTML representation of the current page in the given file. | 339 // Generate an MHTML representation of the current page in the given file. |
| 336 virtual void GenerateMHTML( | 340 virtual void GenerateMHTML( |
| 337 const base::FilePath& file, | 341 const base::FilePath& file, |
| 338 const base::Callback<void( | 342 const base::Callback<void( |
| 339 const base::FilePath& /* path to the MHTML file */, | 343 const base::FilePath& /* path to the MHTML file */, |
| 340 int64 /* size of the file */)>& callback) = 0; | 344 int64 /* size of the file */)>& callback) = 0; |
| 341 | 345 |
| 342 // Returns true if the active NavigationEntry's page_id equals page_id. | 346 // Returns true if the active NavigationEntry's page_id equals page_id. |
| 343 virtual bool IsActiveEntry(int32 page_id) = 0; | 347 virtual bool IsActiveEntry(int32 page_id) = 0; |
| 344 | 348 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 virtual void ViewFrameSource(const GURL& url, | 399 virtual void ViewFrameSource(const GURL& url, |
| 396 const PageState& page_state)= 0; | 400 const PageState& page_state)= 0; |
| 397 | 401 |
| 398 // Gets the minimum/maximum zoom percent. | 402 // Gets the minimum/maximum zoom percent. |
| 399 virtual int GetMinimumZoomPercent() const = 0; | 403 virtual int GetMinimumZoomPercent() const = 0; |
| 400 virtual int GetMaximumZoomPercent() const = 0; | 404 virtual int GetMaximumZoomPercent() const = 0; |
| 401 | 405 |
| 402 // Gets the preferred size of the contents. | 406 // Gets the preferred size of the contents. |
| 403 virtual gfx::Size GetPreferredSize() const = 0; | 407 virtual gfx::Size GetPreferredSize() const = 0; |
| 404 | 408 |
| 405 // Get the content restrictions (see content::ContentRestriction). | |
| 406 virtual int GetContentRestrictions() const = 0; | |
| 407 | |
| 408 // Called when the reponse to a pending mouse lock request has arrived. | 409 // Called when the reponse to a pending mouse lock request has arrived. |
| 409 // Returns true if |allowed| is true and the mouse has been successfully | 410 // Returns true if |allowed| is true and the mouse has been successfully |
| 410 // locked. | 411 // locked. |
| 411 virtual bool GotResponseToLockMouseRequest(bool allowed) = 0; | 412 virtual bool GotResponseToLockMouseRequest(bool allowed) = 0; |
| 412 | 413 |
| 413 // Called when the user has selected a color in the color chooser. | 414 // Called when the user has selected a color in the color chooser. |
| 414 virtual void DidChooseColorInColorChooser(SkColor color) = 0; | 415 virtual void DidChooseColorInColorChooser(SkColor color) = 0; |
| 415 | 416 |
| 416 // Called when the color chooser has ended. | 417 // Called when the color chooser has ended. |
| 417 virtual void DidEndColorChooser() = 0; | 418 virtual void DidEndColorChooser() = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 448 | 449 |
| 449 private: | 450 private: |
| 450 // This interface should only be implemented inside content. | 451 // This interface should only be implemented inside content. |
| 451 friend class WebContentsImpl; | 452 friend class WebContentsImpl; |
| 452 WebContents() {} | 453 WebContents() {} |
| 453 }; | 454 }; |
| 454 | 455 |
| 455 } // namespace content | 456 } // namespace content |
| 456 | 457 |
| 457 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 458 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |