Chromium Code Reviews| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback_forward.h" | |
| 10 #include "base/process_util.h" | 11 #include "base/process_util.h" |
| 11 #include "base/string16.h" | 12 #include "base/string16.h" |
| 12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 13 #include "content/public/browser/page_navigator.h" | 14 #include "content/public/browser/page_navigator.h" |
| 14 #include "content/public/browser/save_page_type.h" | 15 #include "content/public/browser/save_page_type.h" |
| 15 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
| 16 #include "content/public/common/view_type.h" | 17 #include "content/public/common/view_type.h" |
| 17 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 18 #include "webkit/glue/window_open_disposition.h" | 19 #include "webkit/glue/window_open_disposition.h" |
| 19 | 20 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 // Prepare for saving the current web page to disk. | 263 // Prepare for saving the current web page to disk. |
| 263 virtual void OnSavePage() = 0; | 264 virtual void OnSavePage() = 0; |
| 264 | 265 |
| 265 // Save page with the main HTML file path, the directory for saving resources, | 266 // Save page with the main HTML file path, the directory for saving resources, |
| 266 // and the save type: HTML only or complete web page. Returns true if the | 267 // and the save type: HTML only or complete web page. Returns true if the |
| 267 // saving process has been initiated successfully. | 268 // saving process has been initiated successfully. |
| 268 virtual bool SavePage(const FilePath& main_file, | 269 virtual bool SavePage(const FilePath& main_file, |
| 269 const FilePath& dir_path, | 270 const FilePath& dir_path, |
| 270 SavePageType save_type) = 0; | 271 SavePageType save_type) = 0; |
| 271 | 272 |
| 273 // Generate a MHTML representation of the current page in the given file. | |
|
Jói
2012/03/01 10:42:13
Generate a MHTML -> Generate an MHTML
jam
2012/03/01 18:10:17
Done.
| |
| 274 virtual void GenerateMHTML( | |
| 275 const FilePath& file, | |
| 276 const base::Callback<void(const FilePath& /* path to the MHTML file */, | |
| 277 int64 /* size of the file */)>& callback) = 0; | |
| 278 | |
| 272 // Returns true if the active NavigationEntry's page_id equals page_id. | 279 // Returns true if the active NavigationEntry's page_id equals page_id. |
| 273 virtual bool IsActiveEntry(int32 page_id) = 0; | 280 virtual bool IsActiveEntry(int32 page_id) = 0; |
| 274 | 281 |
| 275 // Returns the contents MIME type after a navigation. | 282 // Returns the contents MIME type after a navigation. |
| 276 virtual const std::string& GetContentsMimeType() const = 0; | 283 virtual const std::string& GetContentsMimeType() const = 0; |
| 277 | 284 |
| 278 // Returns true if this TabContents will notify about disconnection. | 285 // Returns true if this TabContents will notify about disconnection. |
| 279 virtual bool WillNotifyDisconnection() const = 0; | 286 virtual bool WillNotifyDisconnection() const = 0; |
| 280 | 287 |
| 281 // Override the encoding and reload the page by sending down | 288 // Override the encoding and reload the page by sending down |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 // to see what it should do. | 362 // to see what it should do. |
| 356 virtual bool FocusLocationBarByDefault() = 0; | 363 virtual bool FocusLocationBarByDefault() = 0; |
| 357 | 364 |
| 358 // Focuses the location bar. | 365 // Focuses the location bar. |
| 359 virtual void SetFocusToLocationBar(bool select_all) = 0; | 366 virtual void SetFocusToLocationBar(bool select_all) = 0; |
| 360 }; | 367 }; |
| 361 | 368 |
| 362 } // namespace content | 369 } // namespace content |
| 363 | 370 |
| 364 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 371 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |