summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/database/database_tracker.cc33
-rw-r--r--webkit/database/database_tracker.h32
-rw-r--r--webkit/glue/dom_operations.cc4
-rw-r--r--webkit/glue/dom_operations.h12
-rw-r--r--webkit/glue/webpreferences.cc49
-rw-r--r--webkit/glue/webpreferences.h47
6 files changed, 103 insertions, 74 deletions
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index a23d9f1..46e9dc1 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -45,6 +45,39 @@ static const int kCurrentVersion = 2;
static const int kCompatibleVersion = 1;
static const char* kExtensionOriginIdentifierPrefix = "chrome-extension_";
+OriginInfo::OriginInfo(const OriginInfo& origin_info)
+ : origin_(origin_info.origin_),
+ total_size_(origin_info.total_size_),
+ quota_(origin_info.quota_),
+ database_info_(origin_info.database_info_) {}
+
+OriginInfo::~OriginInfo() {}
+
+void OriginInfo::GetAllDatabaseNames(std::vector<string16>* databases) const {
+ for (DatabaseInfoMap::const_iterator it = database_info_.begin();
+ it != database_info_.end(); it++) {
+ databases->push_back(it->first);
+ }
+}
+
+int64 OriginInfo::GetDatabaseSize(const string16& database_name) const {
+ DatabaseInfoMap::const_iterator it = database_info_.find(database_name);
+ if (it != database_info_.end())
+ return it->second.first;
+ return 0;
+}
+
+string16 OriginInfo::GetDatabaseDescription(
+ const string16& database_name) const {
+ DatabaseInfoMap::const_iterator it = database_info_.find(database_name);
+ if (it != database_info_.end())
+ return it->second.second;
+ return string16();
+}
+
+OriginInfo::OriginInfo(const string16& origin, int64 total_size, int64 quota)
+ : origin_(origin), total_size_(total_size), quota_(quota) {}
+
DatabaseTracker::DatabaseTracker(const FilePath& profile_path,
bool is_incognito)
: is_initialized_(false),
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 4976a91..08a66b2 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -36,38 +36,20 @@ class QuotaTable;
// This class is used to store information about all databases in an origin.
class OriginInfo {
public:
- OriginInfo(const OriginInfo& origin_info)
- : origin_(origin_info.origin_),
- total_size_(origin_info.total_size_),
- quota_(origin_info.quota_),
- database_info_(origin_info.database_info_) {}
+ OriginInfo(const OriginInfo& origin_info);
+ ~OriginInfo();
+
const string16& GetOrigin() const { return origin_; }
int64 TotalSize() const { return total_size_; }
int64 Quota() const { return quota_; }
- void GetAllDatabaseNames(std::vector<string16>* databases) const {
- for (DatabaseInfoMap::const_iterator it = database_info_.begin();
- it != database_info_.end(); it++) {
- databases->push_back(it->first);
- }
- }
- int64 GetDatabaseSize(const string16& database_name) const {
- DatabaseInfoMap::const_iterator it = database_info_.find(database_name);
- if (it != database_info_.end())
- return it->second.first;
- return 0;
- }
- string16 GetDatabaseDescription(const string16& database_name) const {
- DatabaseInfoMap::const_iterator it = database_info_.find(database_name);
- if (it != database_info_.end())
- return it->second.second;
- return string16();
- }
+ void GetAllDatabaseNames(std::vector<string16>* databases) const;
+ int64 GetDatabaseSize(const string16& database_name) const;
+ string16 GetDatabaseDescription(const string16& database_name) const;
protected:
typedef std::map<string16, std::pair<int64, string16> > DatabaseInfoMap;
- OriginInfo(const string16& origin, int64 total_size, int64 quota)
- : origin_(origin), total_size_(total_size), quota_(quota) { }
+ OriginInfo(const string16& origin, int64 total_size, int64 quota);
string16 origin_;
int64 total_size_;
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index b459473..aab6f36 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -428,6 +428,10 @@ static gfx::Size ParseIconSize(const string16& text) {
ParseSingleIconSize(sizes[1]));
}
+WebApplicationInfo::WebApplicationInfo() {}
+
+WebApplicationInfo::~WebApplicationInfo() {}
+
bool ParseIconSizes(const string16& text,
std::vector<gfx::Size>* sizes,
bool* is_any) {
diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h
index 20084f7..1b6151b 100644
--- a/webkit/glue/dom_operations.h
+++ b/webkit/glue/dom_operations.h
@@ -64,6 +64,9 @@ bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view,
// Structure used when installing a web page as an app. Populated via
// GetApplicationInfo.
struct WebApplicationInfo {
+ WebApplicationInfo();
+ ~WebApplicationInfo();
+
struct IconInfo {
GURL url;
int width;
@@ -134,10 +137,11 @@ WebKit::WebString GetSubResourceLinkFromElement(
// Puts the meta-elements of |document| that have the attribute |attribute_name|
// with a value of |attribute_value| in |meta_elements|.
-void GetMetaElementsWithAttribute(WebKit::WebDocument* document,
- const string16& attribute_name,
- const string16& atribute_value,
- std::vector<WebKit::WebElement>* meta_elements);
+void GetMetaElementsWithAttribute(
+ WebKit::WebDocument* document,
+ const string16& attribute_name,
+ const string16& atribute_value,
+ std::vector<WebKit::WebElement>* meta_elements);
} // namespace webkit_glue
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index ddf4ddb..ecb2c38 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -20,6 +20,55 @@ using WebKit::WebString;
using WebKit::WebURL;
using WebKit::WebView;
+WebPreferences::WebPreferences()
+ : standard_font_family(L"Times New Roman"),
+ fixed_font_family(L"Courier New"),
+ serif_font_family(L"Times New Roman"),
+ sans_serif_font_family(L"Arial"),
+ cursive_font_family(L"Script"),
+ fantasy_font_family(), // Not sure what to use on Windows.
+ default_font_size(16),
+ default_fixed_font_size(13),
+ minimum_font_size(1),
+ minimum_logical_font_size(6),
+ default_encoding("ISO-8859-1"),
+ javascript_enabled(true),
+ web_security_enabled(true),
+ javascript_can_open_windows_automatically(true),
+ loads_images_automatically(true),
+ plugins_enabled(true),
+ dom_paste_enabled(false), // enables execCommand("paste")
+ developer_extras_enabled(false), // Requires extra work by embedder
+ site_specific_quirks_enabled(false),
+ shrinks_standalone_images_to_fit(true),
+ uses_universal_detector(false), // Disabled: page cycler regression
+ text_areas_are_resizable(true),
+ java_enabled(true),
+ allow_scripts_to_close_windows(false),
+ uses_page_cache(false),
+ remote_fonts_enabled(true),
+ javascript_can_access_clipboard(false),
+ xss_auditor_enabled(false),
+ local_storage_enabled(false),
+ databases_enabled(false),
+ application_cache_enabled(false),
+ tabs_to_links(true),
+ caret_browsing_enabled(false),
+ hyperlink_auditing_enabled(true),
+ user_style_sheet_enabled(false),
+ author_and_user_styles_enabled(true),
+ allow_universal_access_from_file_urls(false),
+ allow_file_access_from_file_urls(false),
+ experimental_webgl_enabled(false),
+ show_composited_layer_borders(false),
+ accelerated_compositing_enabled(false),
+ accelerated_2d_canvas_enabled(false),
+ memory_info_enabled(false) {
+}
+
+WebPreferences::~WebPreferences() {
+}
+
void WebPreferences::Apply(WebView* web_view) const {
WebSettings* settings = web_view->settings();
settings->setStandardFontFamily(WideToUTF16Hack(standard_font_family));
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index c9c8d8d..e9f0c01 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -72,51 +72,8 @@ struct WebPreferences {
// We try to keep the default values the same as the default values in
// chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value.
- WebPreferences()
- : standard_font_family(L"Times New Roman"),
- fixed_font_family(L"Courier New"),
- serif_font_family(L"Times New Roman"),
- sans_serif_font_family(L"Arial"),
- cursive_font_family(L"Script"),
- fantasy_font_family(), // Not sure what to use on Windows.
- default_font_size(16),
- default_fixed_font_size(13),
- minimum_font_size(1),
- minimum_logical_font_size(6),
- default_encoding("ISO-8859-1"),
- javascript_enabled(true),
- web_security_enabled(true),
- javascript_can_open_windows_automatically(true),
- loads_images_automatically(true),
- plugins_enabled(true),
- dom_paste_enabled(false), // enables execCommand("paste")
- developer_extras_enabled(false), // Requires extra work by embedder
- site_specific_quirks_enabled(false),
- shrinks_standalone_images_to_fit(true),
- uses_universal_detector(false), // Disabled: page cycler regression
- text_areas_are_resizable(true),
- java_enabled(true),
- allow_scripts_to_close_windows(false),
- uses_page_cache(false),
- remote_fonts_enabled(true),
- javascript_can_access_clipboard(false),
- xss_auditor_enabled(false),
- local_storage_enabled(false),
- databases_enabled(false),
- application_cache_enabled(false),
- tabs_to_links(true),
- caret_browsing_enabled(false),
- hyperlink_auditing_enabled(true),
- user_style_sheet_enabled(false),
- author_and_user_styles_enabled(true),
- allow_universal_access_from_file_urls(false),
- allow_file_access_from_file_urls(false),
- experimental_webgl_enabled(false),
- show_composited_layer_borders(false),
- accelerated_compositing_enabled(false),
- accelerated_2d_canvas_enabled(false),
- memory_info_enabled(false) {
- }
+ WebPreferences();
+ ~WebPreferences();
void Apply(WebKit::WebView* web_view) const;
};