summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser.scons1
-rwxr-xr-xchrome/browser/fav_icon_helper.cc12
-rw-r--r--chrome/browser/fav_icon_helper.h9
-rw-r--r--chrome/browser/jsmessage_box_handler_win.cc2
-rw-r--r--chrome/browser/tab_contents/web_contents.h12
-rw-r--r--chrome/chrome.xcodeproj/project.pbxproj2
-rw-r--r--chrome/common/temp_scaffolding_stubs.h9
7 files changed, 25 insertions, 22 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 19ffdac..94eed65 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -700,7 +700,6 @@ if not env.Bit('windows'):
'encoding_menu_controller_delegate.cc',
'external_protocol_handler.cc',
'external_tab_container.cc',
- 'fav_icon_helper.cc',
'first_run.cc',
'gears_integration.cc',
'hang_monitor/hung_plugin_action.cc',
diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc
index cd6808b..a35868d 100755
--- a/chrome/browser/fav_icon_helper.cc
+++ b/chrome/browser/fav_icon_helper.cc
@@ -4,16 +4,23 @@
#include "chrome/browser/fav_icon_helper.h"
+#include "build/build_config.h"
+
#include "base/gfx/png_decoder.h"
#include "base/gfx/png_encoder.h"
#include "chrome/browser/renderer_host/render_view_host.h"
-#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
-#include "chrome/browser/tab_contents/tab_contents_delegate.h"
+#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/gfx/favicon_size.h"
#include "skia/ext/image_operations.h"
+#if defined(OS_WIN)
+#include "chrome/browser/tab_contents/tab_contents_delegate.h"
+#elif defined(OS_POSIX)
+#include "chrome/common/temp_scaffolding_stubs.h"
+#endif
+
FavIconHelper::FavIconHelper(WebContents* web_contents)
: web_contents_(web_contents),
got_fav_icon_url_(false),
@@ -258,4 +265,3 @@ SkBitmap FavIconHelper::ConvertToFavIconSize(const SkBitmap& image) {
}
return image;
}
-
diff --git a/chrome/browser/fav_icon_helper.h b/chrome/browser/fav_icon_helper.h
index 83a46d1..25cb56a 100644
--- a/chrome/browser/fav_icon_helper.h
+++ b/chrome/browser/fav_icon_helper.h
@@ -6,15 +6,17 @@
#define CHROME_BROWSER_FAV_ICON_HELPER_H__
#include <map>
+#include <vector>
#include "base/basictypes.h"
-#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/history.h"
-#include "chrome/browser/profile.h"
+#include "chrome/common/ref_counted_util.h"
#include "googleurl/src/gurl.h"
class NavigationEntry;
+class Profile;
class SkBitmap;
class WebContents;
@@ -157,11 +159,10 @@ class FavIconHelper {
bool fav_icon_expired_;
// Requests to the renderer to download favicons.
- typedef std::map<int,DownloadRequest> DownloadRequests;
+ typedef std::map<int, DownloadRequest> DownloadRequests;
DownloadRequests download_requests_;
DISALLOW_EVIL_CONSTRUCTORS(FavIconHelper);
};
#endif // CHROME_BROWSER_FAV_ICON_HELPER_H__
-
diff --git a/chrome/browser/jsmessage_box_handler_win.cc b/chrome/browser/jsmessage_box_handler_win.cc
index 3497838..9dac0f4 100644
--- a/chrome/browser/jsmessage_box_handler_win.cc
+++ b/chrome/browser/jsmessage_box_handler_win.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/app_modal_dialog_queue.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/gfx/text_elider.h"
#include "chrome/common/l10n_util.h"
@@ -206,4 +207,3 @@ void JavascriptMessageBoxHandler::Observe(NotificationType type,
dialog_->Close();
}
}
-
diff --git a/chrome/browser/tab_contents/web_contents.h b/chrome/browser/tab_contents/web_contents.h
index 7bb858c..1ae3f79 100644
--- a/chrome/browser/tab_contents/web_contents.h
+++ b/chrome/browser/tab_contents/web_contents.h
@@ -5,9 +5,14 @@
#ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_
#define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_
+#include <map>
+#include <string>
+#include <vector>
+
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "chrome/browser/cancelable_request.h"
+#include "chrome/browser/fav_icon_helper.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/render_view_host_manager.h"
@@ -20,7 +25,6 @@
#include "chrome/common/temp_scaffolding_stubs.h"
#elif defined(OS_WIN)
#include "chrome/browser/download/save_package.h"
-#include "chrome/browser/fav_icon_helper.h"
#include "chrome/browser/printing/print_view_manager.h"
#include "chrome/browser/shell_dialogs.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -212,7 +216,7 @@ class WebContents : public TabContents,
// Override the encoding and reload the page by sending down
// ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda
- // the opposite of this, by which 'browser' is notified of
+ // the opposite of this, by which 'browser' is notified of
// the encoding of the current tab from 'renderer' (determined by
// auto-detect, http header, meta, bom detection, etc).
void override_encoding(const std::wstring& encoding) {
@@ -306,7 +310,7 @@ class WebContents : public TabContents,
IPC::Message* reply_msg);
virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms);
virtual void AutofillFormSubmitted(const AutofillForm& form);
- virtual void GetAutofillSuggestions(const std::wstring& field_name,
+ virtual void GetAutofillSuggestions(const std::wstring& field_name,
const std::wstring& user_text, int64 node_id, int request_id);
virtual void PageHasOSDD(RenderViewHost* render_view_host,
int32 page_id, const GURL& url, bool autodetected);
@@ -330,7 +334,7 @@ class WebContents : public TabContents,
new_request_id);
}
virtual bool CanBlur() const;
- virtual void RendererUnresponsive(RenderViewHost* render_view_host,
+ virtual void RendererUnresponsive(RenderViewHost* render_view_host,
bool is_during_unload);
virtual void RendererResponsive(RenderViewHost* render_view_host);
virtual void LoadStateChanged(const GURL& url, net::LoadState load_state);
diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj
index e270f07..8ffdcd4 100644
--- a/chrome/chrome.xcodeproj/project.pbxproj
+++ b/chrome/chrome.xcodeproj/project.pbxproj
@@ -283,6 +283,7 @@
884BD6B5D58856CAC05DE5C0 /* descriptor_set_posix.cc in Sources */ = {isa = PBXBuildFile; fileRef = FE95CE48F3AD7531827F63CF /* descriptor_set_posix.cc */; };
8F51B73AAAF1772ECF9BD180 /* url_fetcher.cc in Sources */ = {isa = PBXBuildFile; fileRef = 778D7927798B7E3FAA498D3D /* url_fetcher.cc */; };
94542322A5E5A8F4FDDAB7F0 /* render_view_host_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E42AD0F28EDB5009A7E88 /* render_view_host_manager.cc */; };
+ 9E85B39CA40439D93CE52E60 /* fav_icon_helper.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF8760E9D4839009A6919 /* fav_icon_helper.cc */; };
A0BC9272AD709E86D492DAEC /* bookmark_storage.cc in Sources */ = {isa = PBXBuildFile; fileRef = D941DBEFD8B8B537DE8A4DAE /* bookmark_storage.cc */; };
A0EB956531B9DB1E40DAE980 /* user_script_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 37521A11B07C479E93A39D52 /* user_script_unittest.cc */; };
A54612DC0EE9958600A8EE5D /* extensions_service_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = A54612DB0EE9958600A8EE5D /* extensions_service_unittest.cc */; };
@@ -5319,6 +5320,7 @@
E4F324430EE5CE94002533CE /* extension.cc in Sources */,
E48B6C280F2783E9002E47EC /* extension_protocols.cc in Sources */,
A54612E20EE995F600A8EE5D /* extensions_service.cc in Sources */,
+ 9E85B39CA40439D93CE52E60 /* fav_icon_helper.cc in Sources */,
E45075C10F1506F2003BE099 /* firefox2_importer.cc in Sources */,
E45075C40F150701003BE099 /* firefox3_importer.cc in Sources */,
E45075C60F15070D003BE099 /* firefox_profile_lock.cc in Sources */,
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 9bbaa7f..428acdd 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -903,15 +903,6 @@ class PrintViewManager {
};
}
-class FavIconHelper {
- public:
- FavIconHelper(WebContents*) { }
- void SetFavIconURL(const GURL&) { NOTIMPLEMENTED(); }
- void SetFavIcon(int, const GURL&, const SkBitmap&) { NOTIMPLEMENTED(); }
- void FavIconDownloadFailed(int) { NOTIMPLEMENTED(); }
- void FetchFavIcon(const GURL&) { NOTIMPLEMENTED(); }
-};
-
class PasswordManager {
public:
PasswordManager(WebContents*) { }