summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/all.gyp2
-rw-r--r--chrome/chrome_exe.gypi4
-rw-r--r--chrome/installer/installer.gyp2
-rw-r--r--chrome/installer/util/util_constants.cc2
-rw-r--r--chrome_frame/FILES2
-rw-r--r--chrome_frame/SYMBOLS2
-rw-r--r--chrome_frame/bho.h3
-rw-r--r--chrome_frame/chrome_active_document.h2
-rw-r--r--chrome_frame/chrome_frame.gyp242
-rw-r--r--chrome_frame/chrome_frame_activex.h2
-rw-r--r--chrome_frame/chrome_frame_activex_base.h1
-rw-r--r--chrome_frame/chrome_launcher.cc2
-rw-r--r--chrome_frame/chrome_launcher_main.cc10
-rw-r--r--chrome_frame/chrome_protocol.h2
-rw-r--r--chrome_frame/chrome_tab.cc9
-rw-r--r--chrome_frame/chrome_tab.def2
-rw-r--r--chrome_frame/chrome_tab_version.rc.version2
-rw-r--r--chrome_frame/html_utils_unittest.cc61
-rw-r--r--chrome_frame/test/chrome_frame_unittests.cc13
-rw-r--r--chrome_frame/test/html_util_unittests.cc52
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc8
-rw-r--r--chrome_frame/test/util_unittests.cc2
-rw-r--r--chrome_frame/test_utils.cc7
-rw-r--r--chrome_frame/test_utils.h6
24 files changed, 178 insertions, 262 deletions
diff --git a/build/all.gyp b/build/all.gyp
index ee2de12..130c259 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -231,7 +231,7 @@
'../chrome/installer/mini_installer.gyp:mini_installer',
'../courgette/courgette.gyp:courgette_unittests',
'../chrome/chrome.gyp:chrome',
- '../chrome_frame/chrome_frame.gyp:npchrome_tab',
+ '../chrome_frame/chrome_frame.gyp:npchrome_frame',
'../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
'../chrome_frame/chrome_frame.gyp:chrome_frame_unittests',
'../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index b5691cb..d57770b 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -134,7 +134,7 @@
# TODO(gregoryd): This could be shared with the 64-bit target, but
# it does not work due to a gyp issue.
'dependencies': [
- '../chrome_frame/chrome_frame.gyp:npchrome_tab',
+ '../chrome_frame/chrome_frame.gyp:npchrome_frame',
],
}],
['OS=="linux" or OS=="freebsd"', {
@@ -529,7 +529,7 @@
# TODO(gregoryd): This could be shared with the 32-bit target, but
# it does not work due to a gyp issue.
'dependencies': [
- '../chrome_frame/chrome_frame.gyp:npchrome_tab',
+ '../chrome_frame/chrome_frame.gyp:npchrome_frame',
],
}],
],
diff --git a/chrome/installer/installer.gyp b/chrome/installer/installer.gyp
index f108a01..b28017d 100644
--- a/chrome/installer/installer.gyp
+++ b/chrome/installer/installer.gyp
@@ -266,7 +266,7 @@
'conditions': [
['chrome_frame_define==1', {
'dependencies': [
- '../../chrome_frame/chrome_frame.gyp:npchrome_tab',
+ '../../chrome_frame/chrome_frame.gyp:npchrome_frame',
],
}],
# TODO(mark): <(branding_dir) should be defined by the
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc
index 64544c4..5505685 100644
--- a/chrome/installer/util/util_constants.cc
+++ b/chrome/installer/util/util_constants.cc
@@ -113,7 +113,7 @@ const wchar_t kChromeExe[] = L"chrome.exe";
const wchar_t kChromeOldExe[] = L"old_chrome.exe";
const wchar_t kChromeNewExe[] = L"new_chrome.exe";
const wchar_t kChromeDll[] = L"chrome.dll";
-const wchar_t kChromeFrameDll[] = L"npchrome_tab.dll";
+const wchar_t kChromeFrameDll[] = L"npchrome_frame.dll";
const wchar_t kSetupExe[] = L"setup.exe";
const wchar_t kInstallerDir[] = L"Installer";
diff --git a/chrome_frame/FILES b/chrome_frame/FILES
index a80b651..0b8f55d 100644
--- a/chrome_frame/FILES
+++ b/chrome_frame/FILES
@@ -1,2 +1,2 @@
-servers\npchrome_tab.dll
+servers\npchrome_frame.dll
servers\chrome_launcher.exe \ No newline at end of file
diff --git a/chrome_frame/SYMBOLS b/chrome_frame/SYMBOLS
index 29e34e4..80d607d 100644
--- a/chrome_frame/SYMBOLS
+++ b/chrome_frame/SYMBOLS
@@ -1,2 +1,2 @@
-servers\npchrome_tab.pdb
+servers\npchrome_frame.pdb
servers\chrome_launcher.pdb \ No newline at end of file
diff --git a/chrome_frame/bho.h b/chrome_frame/bho.h
index d30ae49..c70097f 100644
--- a/chrome_frame/bho.h
+++ b/chrome_frame/bho.h
@@ -108,8 +108,5 @@ END_SINK_MAP()
static _ATL_FUNC_INFO kBeforeNavigate2Info;
};
-// Add Bho to class library table so IE can CoCreate it.
-OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho);
-
#endif // CHROME_FRAME_BHO_H_
diff --git a/chrome_frame/chrome_active_document.h b/chrome_frame/chrome_active_document.h
index 6b57f2e..45df8b7 100644
--- a/chrome_frame/chrome_active_document.h
+++ b/chrome_frame/chrome_active_document.h
@@ -328,6 +328,4 @@ END_EXEC_COMMAND_MAP()
OLEINPLACEFRAMEINFO frame_info_;
};
-OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument)
-
#endif // CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_
diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp
index 34d3600..33f4a4a 100644
--- a/chrome_frame/chrome_frame.gyp
+++ b/chrome_frame/chrome_frame.gyp
@@ -13,125 +13,13 @@
# Deps info.
'xul_include_directories': [
- # TODO(slightlyoff): pare these down. This makes it too easy to
- # regress to using unfrozen FF interfaces.
- '<(xul_sdk_dir)/include',
- '<(xul_sdk_dir)/include/accessibility',
- '<(xul_sdk_dir)/include/alerts',
- '<(xul_sdk_dir)/include/appcomps',
- '<(xul_sdk_dir)/include/appshell',
- '<(xul_sdk_dir)/include/autocomplete',
- '<(xul_sdk_dir)/include/autoconfig',
- '<(xul_sdk_dir)/include/ax_common',
- '<(xul_sdk_dir)/include/browser',
- '<(xul_sdk_dir)/include/cairo',
'<(xul_sdk_dir)/include/caps',
- '<(xul_sdk_dir)/include/chardet',
- '<(xul_sdk_dir)/include/chrome',
- '<(xul_sdk_dir)/include/commandhandler',
- '<(xul_sdk_dir)/include/composer',
- '<(xul_sdk_dir)/include/content',
- '<(xul_sdk_dir)/include/contentprefs',
- '<(xul_sdk_dir)/include/cookie',
- '<(xul_sdk_dir)/include/crashreporter',
- '<(xul_sdk_dir)/include/docshell',
'<(xul_sdk_dir)/include/dom',
- '<(xul_sdk_dir)/include/downloads',
- '<(xul_sdk_dir)/include/editor',
- '<(xul_sdk_dir)/include/embed_base',
- '<(xul_sdk_dir)/include/embedcomponents',
- '<(xul_sdk_dir)/include/expat',
- '<(xul_sdk_dir)/include/extensions',
- '<(xul_sdk_dir)/include/exthandler',
- '<(xul_sdk_dir)/include/exthelper',
- '<(xul_sdk_dir)/include/fastfind',
- '<(xul_sdk_dir)/include/feeds',
- '<(xul_sdk_dir)/include/find',
- '<(xul_sdk_dir)/include/gfx',
- '<(xul_sdk_dir)/include/htmlparser',
- '<(xul_sdk_dir)/include/imgicon',
- '<(xul_sdk_dir)/include/imglib2',
- '<(xul_sdk_dir)/include/inspector',
- '<(xul_sdk_dir)/include/intl',
- '<(xul_sdk_dir)/include/jar',
- '<(xul_sdk_dir)/include/java',
- '<(xul_sdk_dir)/include/jpeg',
'<(xul_sdk_dir)/include/js',
- '<(xul_sdk_dir)/include/jsdebug',
- '<(xul_sdk_dir)/include/jsurl',
- '<(xul_sdk_dir)/include/layout',
- '<(xul_sdk_dir)/include/lcms',
- '<(xul_sdk_dir)/include/libbz2',
- '<(xul_sdk_dir)/include/libmar',
- '<(xul_sdk_dir)/include/libpixman',
- '<(xul_sdk_dir)/include/libreg',
- '<(xul_sdk_dir)/include/liveconnect',
- '<(xul_sdk_dir)/include/locale',
- '<(xul_sdk_dir)/include/loginmgr',
- '<(xul_sdk_dir)/include/lwbrk',
- '<(xul_sdk_dir)/include/mimetype',
- '<(xul_sdk_dir)/include/morkreader',
- '<(xul_sdk_dir)/include/necko',
- '<(xul_sdk_dir)/include/nkcache',
'<(xul_sdk_dir)/include/nspr',
- '<(xul_sdk_dir)/include/nss',
- '<(xul_sdk_dir)/include/oji',
- '<(xul_sdk_dir)/include/parentalcontrols',
- '<(xul_sdk_dir)/include/pipboot',
- '<(xul_sdk_dir)/include/pipnss',
- '<(xul_sdk_dir)/include/pippki',
- '<(xul_sdk_dir)/include/places',
- '<(xul_sdk_dir)/include/plugin',
- '<(xul_sdk_dir)/include/png',
- '<(xul_sdk_dir)/include/pref',
- '<(xul_sdk_dir)/include/prefetch',
- '<(xul_sdk_dir)/include/profdirserviceprovider',
- '<(xul_sdk_dir)/include/profile',
- '<(xul_sdk_dir)/include/rdf',
- '<(xul_sdk_dir)/include/rdfutil',
- '<(xul_sdk_dir)/include/satchel',
- '<(xul_sdk_dir)/include/shistory',
- '<(xul_sdk_dir)/include/simple',
- '<(xul_sdk_dir)/include/spellchecker',
- '<(xul_sdk_dir)/include/sqlite3',
- '<(xul_sdk_dir)/include/storage',
'<(xul_sdk_dir)/include/string',
- '<(xul_sdk_dir)/include/thebes',
- '<(xul_sdk_dir)/include/toolkitcomps',
- '<(xul_sdk_dir)/include/txmgr',
- '<(xul_sdk_dir)/include/txtsvc',
- '<(xul_sdk_dir)/include/uconv',
- '<(xul_sdk_dir)/include/ucvcn',
- '<(xul_sdk_dir)/include/ucvibm',
- '<(xul_sdk_dir)/include/ucvja',
- '<(xul_sdk_dir)/include/ucvko',
- '<(xul_sdk_dir)/include/ucvlatin',
- '<(xul_sdk_dir)/include/ucvmath',
- '<(xul_sdk_dir)/include/ucvtw',
- '<(xul_sdk_dir)/include/ucvtw2',
- '<(xul_sdk_dir)/include/unicharutil',
- '<(xul_sdk_dir)/include/update',
- '<(xul_sdk_dir)/include/uriloader',
- '<(xul_sdk_dir)/include/urlformatter',
- '<(xul_sdk_dir)/include/util',
- '<(xul_sdk_dir)/include/view',
- '<(xul_sdk_dir)/include/webbrowserpersist',
- '<(xul_sdk_dir)/include/webbrwsr',
- '<(xul_sdk_dir)/include/webshell',
- '<(xul_sdk_dir)/include/widget',
- '<(xul_sdk_dir)/include/windowwatcher',
- '<(xul_sdk_dir)/include/xml',
- '<(xul_sdk_dir)/include/xml-rpc',
'<(xul_sdk_dir)/include/xpcom',
'<(xul_sdk_dir)/include/xpconnect',
- '<(xul_sdk_dir)/include/xpinstall',
- '<(xul_sdk_dir)/include/xulapp',
- '<(xul_sdk_dir)/include/xuldoc',
- '<(xul_sdk_dir)/include/xulrunner',
- '<(xul_sdk_dir)/include/xultmpl',
- '<(xul_sdk_dir)/include/zipwriter',
- '<(xul_sdk_dir)/include/zlib',
- '<(xul_sdk_dir)/sdk/include',
],
'conditions': [
['OS=="win"', {
@@ -225,15 +113,21 @@
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'base_noicu',
+ 'chrome_frame_ie',
'chrome_frame_npapi',
'chrome_frame_strings',
'xulrunner_sdk',
],
'sources': [
+ 'chrome_tab.h',
+ 'chrome_tab.idl',
'chrome_frame_npapi_unittest.cc',
'chrome_frame_unittest_main.cc',
'chrome_launcher_unittest.cc',
- 'html_utils_unittest.cc',
+ 'test/com_message_event_unittest.cc',
+ 'test/html_util_unittests.cc',
+ 'test/http_negotiate_unittest.cc',
+ 'test/util_unittests.cc',
'unittest_precompile.h',
'unittest_precompile.cc',
'urlmon_upload_data_stream.cc',
@@ -247,6 +141,7 @@
],
'resource_include_dirs': [
'<(INTERMEDIATE_DIR)',
+ '<(SHARED_INTERMEDIATE_DIR)',
],
'conditions': [
['OS=="win"', {
@@ -255,10 +150,6 @@
'DelayLoadDLLs': ['xpcom.dll', 'nspr4.dll'],
},
},
- 'sources': [
- '<(SHARED_INTERMEDIATE_DIR)/chrome_frame/chrome_frame_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome_frame/chrome_frame_strings.rc',
- ],
'dependencies': [
# TODO(slightlyoff): Get automation targets working on OS X
'../chrome/chrome.gyp:automation',
@@ -272,7 +163,6 @@
'target_name': 'chrome_frame_tests',
'type': 'executable',
'dependencies': [
- # 'base_noicu',
'../build/temp_gyp/googleurl.gyp:googleurl',
'../chrome/chrome.gyp:common',
'../chrome/chrome.gyp:utility',
@@ -282,7 +172,6 @@
'../third_party/libxslt/libxslt.gyp:libxslt',
'chrome_frame_strings',
'chrome_frame_npapi',
- # 'npchrome_tab',
'xulrunner_sdk',
],
'sources': [
@@ -293,17 +182,13 @@
'test/chrome_frame_automation_mock.h',
'test/chrome_frame_unittests.cc',
'test/chrome_frame_unittests.h',
- 'test/com_message_event_unittest.cc',
'test/function_stub_unittest.cc',
- 'test/html_util_unittests.cc',
- 'test/http_negotiate_unittest.cc',
'test/http_server.cc',
'test/http_server.h',
'test/run_all_unittests.cc',
'test/test_server.cc',
'test/test_server.h',
'test/test_server_test.cc',
- 'test/util_unittests.cc',
'chrome_frame_automation.cc',
'chrome_frame_histograms.h',
'chrome_frame_histograms.cc',
@@ -342,10 +227,6 @@
'DelayLoadDLLs': ['xpcom.dll', 'nspr4.dll'],
},
},
- 'sources': [
- '<(SHARED_INTERMEDIATE_DIR)/chrome_frame/chrome_frame_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome_frame/chrome_frame_strings.rc',
- ],
'dependencies': [
'../chrome/chrome.gyp:automation',
'../chrome/installer/installer.gyp:installer_util',
@@ -505,10 +386,6 @@
],
'conditions': [
['OS=="win"', {
- 'sources': [
- '<(SHARED_INTERMEDIATE_DIR)/chrome_frame/chrome_frame_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome_frame/chrome_frame_strings.rc',
- ],
'dependencies': [
# TODO(slightlyoff): Get automation targets working on OS X
'../chrome/chrome.gyp:automation',
@@ -537,6 +414,8 @@
'chrome_frame_npapi.h',
'chrome_launcher.cc',
'chrome_launcher.h',
+ 'ff_30_privilege_check.cc',
+ 'ff_privilege_check.h',
'html_utils.cc',
'html_utils.h',
'np_browser_functions.cc',
@@ -552,6 +431,7 @@
'plugin_url_request.cc',
'plugin_url_request.h',
'scoped_ns_ptr_win.h',
+ 'script_security_manager.h',
'sync_msg_reply_dispatcher.cc',
'sync_msg_reply_dispatcher.h',
'utils.cc',
@@ -633,24 +513,14 @@
],
},
{
- 'target_name': 'npchrome_tab',
- 'type': 'shared_library',
- 'msvs_guid': 'E3DE7E63-D3B6-4A9F-BCC4-5C8169E9C9F2',
+ 'target_name': 'chrome_frame_ie',
+ 'type': 'static_library',
'dependencies': [
- 'base_noicu',
- 'chrome_frame_npapi',
'chrome_frame_strings',
- 'chrome_launcher',
- 'xulrunner_sdk',
'../chrome/chrome.gyp:common',
'../chrome/chrome.gyp:utility',
'../build/temp_gyp/googleurl.gyp:googleurl',
- # FIXME(slightlyoff):
- # gigantic hack to get these to build from main Chrome sln.
- 'chrome_frame_perftests',
- 'chrome_frame_tests',
- 'chrome_frame_unittests',
- 'chrome_frame_net_tests',
+
],
'sources': [
'bho.cc',
@@ -663,40 +533,28 @@
'chrome_frame_activex.h',
'chrome_frame_activex_base.h',
'chrome_frame_activex.rgs',
- 'chrome_frame_npapi.rgs',
- 'chrome_frame_npapi_entrypoints.cc',
+ 'chrome_frame_histograms.h',
+ 'chrome_frame_histograms.cc',
'chrome_frame_reporting.cc',
'chrome_frame_reporting.h',
'chrome_protocol.cc',
'chrome_protocol.h',
'chrome_protocol.rgs',
- 'chrome_tab.cc',
- 'chrome_tab.def',
'chrome_tab.h',
'chrome_tab.idl',
- # FIXME(slightlyoff): For chrome_tab.tlb. Giant hack until we can
- # figure out something more gyp-ish.
- 'resources/tlb_resource.rc',
- 'chrome_tab.rgs',
- 'chrome_tab_version.rc.version',
'com_message_event.cc',
'com_message_event.h',
'com_type_info_holder.cc',
'com_type_info_holder.h',
- 'ff_30_privilege_check.cc',
- 'ff_privilege_check.h',
'find_dialog.cc',
'find_dialog.h',
'function_stub.h',
'http_negotiate.h',
'http_negotiate.cc',
- 'iids.cc',
'in_place_menu.h',
'ole_document_impl.h',
'protocol_sink_wrap.cc',
'protocol_sink_wrap.h',
- 'resource.h',
- 'script_security_manager.h',
'sync_msg_reply_dispatcher.cc',
'sync_msg_reply_dispatcher.h',
'extra_system_apis.h',
@@ -706,13 +564,75 @@
'urlmon_upload_data_stream.h',
'vtable_patch_manager.cc',
'vtable_patch_manager.h',
- 'chrome_frame_histograms.h',
- 'chrome_frame_histograms.cc',
],
'include_dirs': [
# To allow including "chrome_tab.h"
'<(INTERMEDIATE_DIR)',
- '<(INTERMEDIATE_DIR)/../npchrome_tab',
+ '<(INTERMEDIATE_DIR)/../chrome_frame',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ # NOTE(slightlyoff):
+ # this is a fix for the include dirs length limit on the resource
+ # compiler, tickled by the xul_include_dirs variable
+ 'resource_include_dirs': [
+ '<(INTERMEDIATE_DIR)'
+ ],
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:breakpad_handler',
+ '../chrome/chrome.gyp:automation',
+ # Make the archive build happy.
+ '../chrome/chrome.gyp:syncapi',
+ # Installer
+ '../chrome/installer/installer.gyp:installer_util',
+ '../google_update/google_update.gyp:google_update',
+ # Crash Reporting
+ 'crash_reporting/crash_reporting.gyp:crash_report',
+ 'crash_reporting/crash_reporting.gyp:vectored_handler_tests',
+ ],
+ },],
+ ],
+ },
+ {
+ 'target_name': 'npchrome_frame',
+ 'type': 'shared_library',
+ 'msvs_guid': 'E3DE7E63-D3B6-4A9F-BCC4-5C8169E9C9F2',
+ 'dependencies': [
+ 'base_noicu',
+ 'chrome_frame_ie',
+ 'chrome_frame_npapi',
+ 'chrome_frame_strings',
+ 'chrome_launcher',
+ 'xulrunner_sdk',
+ '../chrome/chrome.gyp:common',
+ '../chrome/chrome.gyp:utility',
+ '../build/temp_gyp/googleurl.gyp:googleurl',
+ # FIXME(slightlyoff):
+ # gigantic hack to get these to build from main Chrome sln.
+ 'chrome_frame_perftests',
+ 'chrome_frame_tests',
+ 'chrome_frame_unittests',
+ 'chrome_frame_net_tests',
+ ],
+ 'sources': [
+ 'chrome_frame_npapi.rgs',
+ 'chrome_frame_npapi_entrypoints.cc',
+ 'chrome_tab.cc',
+ 'chrome_tab.def',
+ 'chrome_tab.h',
+ 'chrome_tab.idl',
+ # FIXME(slightlyoff): For chrome_tab.tlb. Giant hack until we can
+ # figure out something more gyp-ish.
+ 'resources/tlb_resource.rc',
+ 'chrome_tab.rgs',
+ 'chrome_tab_version.rc.version',
+ 'iids.cc',
+ 'resource.h',
+ ],
+ 'include_dirs': [
+ # To allow including "chrome_tab.h"
+ '<(INTERMEDIATE_DIR)',
+ '<(INTERMEDIATE_DIR)/../chrome_frame',
],
'conditions': [
['OS=="win"', {
diff --git a/chrome_frame/chrome_frame_activex.h b/chrome_frame/chrome_frame_activex.h
index 1acbc37..31c85b1 100644
--- a/chrome_frame/chrome_frame_activex.h
+++ b/chrome_frame/chrome_frame_activex.h
@@ -125,6 +125,4 @@ END_MSG_MAP()
};
-OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex)
-
#endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_H_
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index 0ba55e5..dce42b2 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -8,6 +8,7 @@
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
+#include <wininet.h>
// Copied min/max defs from windows headers to appease atlimage.h.
// TODO(slightlyoff): Figure out of more recent platform SDK's (> 6.1)
diff --git a/chrome_frame/chrome_launcher.cc b/chrome_frame/chrome_launcher.cc
index 731ff04..ef20826 100644
--- a/chrome_frame/chrome_launcher.cc
+++ b/chrome_frame/chrome_launcher.cc
@@ -34,7 +34,7 @@ CommandLine* CreateLaunchCommandLine() {
// TODO(joi) As optimization, could launch Chrome directly when running at
// medium integrity. (Requires bringing in code to read SIDs, etc.)
- // The launcher EXE will be in the same directory as the npchrome_tab DLL,
+ // The launcher EXE will be in the same directory as the Chrome Frame DLL,
// so create a full path to it based on this assumption. Since our unit
// tests also use this function, and live in the directory above, we test
// existence of the file and try the path that includes the /servers/
diff --git a/chrome_frame/chrome_launcher_main.cc b/chrome_frame/chrome_launcher_main.cc
index f69ed7f..8eaedae 100644
--- a/chrome_frame/chrome_launcher_main.cc
+++ b/chrome_frame/chrome_launcher_main.cc
@@ -29,7 +29,7 @@ extern "C" void __cdecl WinMainCRTStartup() {
// directory in the DLL search path.
//
// The code is a bit verbose because we can't use the standard library.
- const wchar_t kBaseName[] = L"npchrome_tab.dll";
+ const wchar_t kBaseName[] = L"npchrome_frame.dll";
wchar_t file_path[MAX_PATH + (sizeof(kBaseName) / sizeof(kBaseName[0])) + 1];
file_path[0] = L'\0';
::GetModuleFileName(::GetModuleHandle(NULL), file_path, MAX_PATH);
@@ -38,11 +38,11 @@ extern "C" void __cdecl WinMainCRTStartup() {
//
// Proof for security purposes, since we can't use the safe string
// manipulation functions from the runtime:
- // - File_path is always null-terminated, by us initially and by
+ // - File_path is always null-terminated, by us initially and by
// ::GetModuleFileName if it puts anything into the buffer.
// - If there is no slash in the path then it's a relative path, not an
// absolute one, and the code ends up creating a relative path to
- // npchrome_tab.dll.
+ // npchrome_frame.dll.
// - It's safe to use lstrcatW since we know the maximum length of both
// parts we are concatenating, and we know the buffer will fit them in
// the worst case.
@@ -51,7 +51,7 @@ extern "C" void __cdecl WinMainCRTStartup() {
CLM_ASSERT(slash_index > 0);
while (slash_index > 0 && file_path[slash_index] != L'\\')
--slash_index;
- // Invariant: 0 <= slash_index < MAX_PATH and it is either the index of
+ // Invariant: 0 <= slash_index < MAX_PATH and it is either the index of
// the last \ in the path, or 0.
if (slash_index != 0)
++slash_index; // don't remove the last '\'
@@ -63,7 +63,7 @@ extern "C" void __cdecl WinMainCRTStartup() {
HMODULE chrome_tab = ::LoadLibrary(file_path);
CLM_ASSERT(chrome_tab);
if (chrome_tab) {
- chrome_launcher::CfLaunchChromeProc proc =
+ chrome_launcher::CfLaunchChromeProc proc =
reinterpret_cast<chrome_launcher::CfLaunchChromeProc>(
::GetProcAddress(chrome_tab, "CfLaunchChrome"));
CLM_ASSERT(proc);
diff --git a/chrome_frame/chrome_protocol.h b/chrome_frame/chrome_protocol.h
index 751162b..d98ca69 100644
--- a/chrome_frame/chrome_protocol.h
+++ b/chrome_frame/chrome_protocol.h
@@ -60,6 +60,4 @@ class ATL_NO_VTABLE ChromeProtocol
STDMETHOD(UnlockRequest)(void);
};
-OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol)
-
#endif // CHROME_FRAME_CHROME_PROTOCOL_H_
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 0783a61..9944f5b 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -24,9 +24,12 @@
#include "chrome/common/chrome_constants.h"
#include "grit/chrome_frame_resources.h"
#include "chrome_frame/bho.h"
+#include "chrome_frame/chrome_active_document.h"
+#include "chrome_frame/chrome_frame_activex.h"
#include "chrome_frame/chrome_frame_automation.h"
#include "chrome_frame/chrome_frame_reporting.h"
#include "chrome_frame/chrome_launcher.h"
+#include "chrome_frame/chrome_protocol.h"
#include "chrome_frame/resource.h"
#include "chrome_frame/utils.h"
@@ -44,6 +47,12 @@ static const GUID kChromeFrameProvider =
{ 0x562bfc3, 0x2550, 0x45b4,
{ 0xbd, 0x8e, 0xa3, 0x10, 0x58, 0x3d, 0x3a, 0x6f } };
+// Object entries go here instead of with each object, so that we can move
+// the objects to a lib. Also reduces magic.
+OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho)
+OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument)
+OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex)
+OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol)
class ChromeTabModule
: public AtlPerUserModule<CAtlDllModuleT<ChromeTabModule> > {
diff --git a/chrome_frame/chrome_tab.def b/chrome_frame/chrome_tab.def
index ae2ddd2..98e6899 100644
--- a/chrome_frame/chrome_tab.def
+++ b/chrome_frame/chrome_tab.def
@@ -1,6 +1,6 @@
; ChromeTab.def : Declares the module parameters.
-LIBRARY "npchrome_tab.dll"
+LIBRARY "npchrome_frame.dll"
EXPORTS
DllCanUnloadNow PRIVATE
diff --git a/chrome_frame/chrome_tab_version.rc.version b/chrome_frame/chrome_tab_version.rc.version
index 90e446a..52312ff 100644
--- a/chrome_frame/chrome_tab_version.rc.version
+++ b/chrome_frame/chrome_tab_version.rc.version
@@ -33,7 +33,7 @@ BEGIN
VALUE "MIMEType", "application/chromeframe"
VALUE "FileExtents", "chromeframe"
VALUE "FileOpenName", "chromeframe"
- VALUE "OriginalFilename", "npchrome_tab.dll"
+ VALUE "OriginalFilename", "npchrome_frame.dll"
VALUE "LastChange", "@LASTCHANGE@"
VALUE "Official Build", "@OFFICIAL_BUILD@"
END
diff --git a/chrome_frame/html_utils_unittest.cc b/chrome_frame/html_utils_unittest.cc
deleted file mode 100644
index 73b7a4a..0000000
--- a/chrome_frame/html_utils_unittest.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/logging.h"
-#include "chrome_frame/html_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-TEST(HttpUtils, HasFrameBustingHeader) {
- // Simple negative cases.
- ASSERT_FALSE(http_utils::HasFrameBustingHeader(""));
- ASSERT_FALSE(http_utils::HasFrameBustingHeader("Content-Type: text/plain"));
- // Explicit negative cases, test that we ignore case.
- ASSERT_FALSE(http_utils::HasFrameBustingHeader("X-Frame-Options: ALLOWALL"));
- ASSERT_FALSE(http_utils::HasFrameBustingHeader("X-Frame-Options: allowall"));
- ASSERT_FALSE(http_utils::HasFrameBustingHeader("X-Frame-Options: ALLowalL"));
- // Added space, ensure stripped out
- ASSERT_FALSE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: ALLOWALL "));
- // Added space with linefeed, ensure still stripped out
- ASSERT_FALSE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: ALLOWALL \r\n"));
- // Multiple identical headers, all of them allowing framing.
- ASSERT_FALSE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: ALLOWALL\r\n"
- "X-Frame-Options: ALLOWALL\r\n"
- "X-Frame-Options: ALLOWALL"));
- // Interleave with other headers.
- ASSERT_FALSE(http_utils::HasFrameBustingHeader(
- "Content-Type: text/plain\r\n"
- "X-Frame-Options: ALLOWALL\r\n"
- "Content-Length: 42"));
-
- // Simple positive cases.
- ASSERT_TRUE(http_utils::HasFrameBustingHeader("X-Frame-Options: deny"));
- ASSERT_TRUE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: SAMEorigin"));
-
- // Allowall entries do not override the denying entries, are
- // order-independent, and the deny entries can interleave with
- // other headers.
- ASSERT_TRUE(http_utils::HasFrameBustingHeader(
- "Content-Length: 42\r\n"
- "X-Frame-Options: ALLOWall\r\n"
- "X-Frame-Options: deny\r\n"));
- ASSERT_TRUE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: ALLOWall\r\n"
- "Content-Length: 42\r\n"
- "X-Frame-Options: SAMEORIGIN\r\n"));
- ASSERT_TRUE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: deny\r\n"
- "X-Frame-Options: ALLOWall\r\n"
- "Content-Length: 42\r\n"));
- ASSERT_TRUE(http_utils::HasFrameBustingHeader(
- "X-Frame-Options: SAMEORIGIN\r\n"
- "X-Frame-Options: ALLOWall\r\n"));
-}
-
-} // namespace
diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc
index 10c3edb..b68dfe8 100644
--- a/chrome_frame/test/chrome_frame_unittests.cc
+++ b/chrome_frame/test/chrome_frame_unittests.cc
@@ -195,7 +195,8 @@ void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser,
const wchar_t* page, const wchar_t* result_file_to_check) {
std::wstring plugin_path;
PathService::Get(base::DIR_MODULE, &plugin_path);
- file_util::AppendToPath(&plugin_path, L"servers/npchrome_tab.dll");
+ file_util::AppendToPath(&plugin_path, L"servers");
+ file_util::AppendToPath(&plugin_path, kChromeFrameDllName);
static FileVersionInfo* version_info =
FileVersionInfo::CreateFileVersionInfo(plugin_path);
@@ -204,7 +205,7 @@ void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser,
if (version_info)
version = version_info->product_version();
- // If we can't find the npchrome_tab.dll in the src tree, we turn to
+ // If we can't find the Chrome Frame DLL in the src tree, we turn to
// the directory where chrome is installed.
if (!version_info) {
installer::Version* ver_system = InstallUtil::GetChromeVersion(true);
@@ -212,11 +213,11 @@ void ChromeFrameTestWithWebServer::VersionTest(BrowserKind browser,
ASSERT_TRUE(ver_system || ver_user);
bool system_install = ver_system ? true : false;
- std::wstring npchrome_path(installer::GetChromeInstallPath(system_install));
- file_util::AppendToPath(&npchrome_path,
+ std::wstring cf_dll_path(installer::GetChromeInstallPath(system_install));
+ file_util::AppendToPath(&cf_dll_path,
ver_system ? ver_system->GetString() : ver_user->GetString());
- file_util::AppendToPath(&npchrome_path, L"npchrome_tab.dll");
- version_info = FileVersionInfo::CreateFileVersionInfo(npchrome_path);
+ file_util::AppendToPath(&cf_dll_path, kChromeFrameDllName);
+ version_info = FileVersionInfo::CreateFileVersionInfo(cf_dll_path);
if (version_info)
version = version_info->product_version();
}
diff --git a/chrome_frame/test/html_util_unittests.cc b/chrome_frame/test/html_util_unittests.cc
index f654726..969e680 100644
--- a/chrome_frame/test/html_util_unittests.cc
+++ b/chrome_frame/test/html_util_unittests.cc
@@ -309,3 +309,55 @@ TEST_F(HtmlUtilUnittest, GetChromeFrameUserAgent) {
std::string ua(call1);
EXPECT_EQ("chromeframe/0.0", ua);
}
+
+TEST(HttpUtils, HasFrameBustingHeader) {
+ // Simple negative cases.
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader(""));
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader("Content-Type: text/plain"));
+ // Explicit negative cases, test that we ignore case.
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader("X-Frame-Options: ALLOWALL"));
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader("X-Frame-Options: allowall"));
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader("X-Frame-Options: ALLowalL"));
+ // Added space, ensure stripped out
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: ALLOWALL "));
+ // Added space with linefeed, ensure still stripped out
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: ALLOWALL \r\n"));
+ // Multiple identical headers, all of them allowing framing.
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: ALLOWALL\r\n"
+ "X-Frame-Options: ALLOWALL\r\n"
+ "X-Frame-Options: ALLOWALL"));
+ // Interleave with other headers.
+ EXPECT_FALSE(http_utils::HasFrameBustingHeader(
+ "Content-Type: text/plain\r\n"
+ "X-Frame-Options: ALLOWALL\r\n"
+ "Content-Length: 42"));
+
+ // Simple positive cases.
+ EXPECT_TRUE(http_utils::HasFrameBustingHeader("X-Frame-Options: deny"));
+ EXPECT_TRUE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: SAMEorigin"));
+
+ // Allowall entries do not override the denying entries, are
+ // order-independent, and the deny entries can interleave with
+ // other headers.
+ EXPECT_TRUE(http_utils::HasFrameBustingHeader(
+ "Content-Length: 42\r\n"
+ "X-Frame-Options: ALLOWall\r\n"
+ "X-Frame-Options: deny\r\n"));
+ EXPECT_TRUE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: ALLOWall\r\n"
+ "Content-Length: 42\r\n"
+ "X-Frame-Options: SAMEORIGIN\r\n"));
+ EXPECT_TRUE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: deny\r\n"
+ "X-Frame-Options: ALLOWall\r\n"
+ "Content-Length: 42\r\n"));
+ EXPECT_TRUE(http_utils::HasFrameBustingHeader(
+ "X-Frame-Options: SAMEORIGIN\r\n"
+ "X-Frame-Options: ALLOWall\r\n"));
+}
+
+
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index 762b424..8ac05cf 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -133,7 +133,7 @@ class ChromeFrameActiveXContainer
OnReadyStateChanged(ready_state);
if (ready_state == READYSTATE_COMPLETE) {
- if(!starting_url_.empty()) {
+ if (!starting_url_.empty()) {
Navigate(starting_url_.c_str());
} else {
PostMessage(WM_CLOSE);
@@ -286,8 +286,9 @@ class ChromeFrameStartupTest : public ChromeFramePerfTestBase {
chrome_dll_ = dir_app_.Append(FILE_PATH_LITERAL("chrome.dll"));
chrome_exe_ = dir_app_.Append(
FilePath::FromWStringHack(chrome::kBrowserProcessExecutableName));
+ chrome_frame_dll_ = dir_app_.Append(FILE_PATH_LITERAL("servers"));
chrome_frame_dll_ = dir_app_.Append(
- FILE_PATH_LITERAL("servers\\npchrome_tab.dll"));
+ FilePath::FromWStringHack(kChromeFrameDllName));
}
virtual void TearDown() {}
@@ -327,7 +328,7 @@ class ChromeFrameStartupTest : public ChromeFramePerfTestBase {
timings[i] = end_time - start_time;
CoFreeUnusedLibraries();
- ASSERT_TRUE(GetModuleHandle(L"npchrome_tab.dll") == NULL);
+ ASSERT_TRUE(GetModuleHandle(kChromeFrameDllName) == NULL);
// TODO(beng): Can't shut down so quickly. Figure out why, and fix. If we
// do, we crash.
@@ -821,7 +822,6 @@ class ChromeFrameActiveXMemoryTest : public MemoryTestBase {
PrintResults(test_name_.c_str());
CoFreeUnusedLibraries();
- //ASSERT_TRUE(GetModuleHandle(L"npchrome_tab.dll") == NULL);
}
void NavigateImpl(const std::string& url) {
diff --git a/chrome_frame/test/util_unittests.cc b/chrome_frame/test/util_unittests.cc
index b926ee4..9c0be26 100644
--- a/chrome_frame/test/util_unittests.cc
+++ b/chrome_frame/test/util_unittests.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "base/file_version_info.h"
-#include "chrome_frame/test/chrome_frame_unittests.h"
#include "chrome_frame/utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
const wchar_t kChannelName[] = L"-dev";
const wchar_t kSuffix[] = L"-fix";
diff --git a/chrome_frame/test_utils.cc b/chrome_frame/test_utils.cc
index bbe6c86..cf6b219 100644
--- a/chrome_frame/test_utils.cc
+++ b/chrome_frame/test_utils.cc
@@ -19,13 +19,14 @@
#include "chrome/common/chrome_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
-// Statics
+const wchar_t kChromeFrameDllName[] = L"npchrome_frame.dll";
+// Statics
FilePath ScopedChromeFrameRegistrar::GetChromeFrameBuildPath() {
FilePath build_path;
PathService::Get(chrome::DIR_APP, &build_path);
build_path = build_path.Append(L"servers").
- Append(L"npchrome_tab.dll");
+ Append(kChromeFrameDllName);
file_util::PathExists(build_path);
return build_path;
}
@@ -92,7 +93,7 @@ void ScopedChromeFrameRegistrar::RegisterReferenceChromeFrameBuild() {
file_util::AppendToPath(&reference_build_dir, L"reference_build");
file_util::AppendToPath(&reference_build_dir, L"chrome_frame");
file_util::AppendToPath(&reference_build_dir, L"servers");
- file_util::AppendToPath(&reference_build_dir, L"npchrome_tab.dll");
+ file_util::AppendToPath(&reference_build_dir, kChromeFrameDllName);
RegisterChromeFrameAtPath(reference_build_dir);
}
diff --git a/chrome_frame/test_utils.h b/chrome_frame/test_utils.h
index 9dc3a7e..0d18379 100644
--- a/chrome_frame/test_utils.h
+++ b/chrome_frame/test_utils.h
@@ -12,6 +12,8 @@
#include "base/file_path.h"
+extern const wchar_t kChromeFrameDllName[];
+
// Helper class used to register different chrome frame DLLs while running
// tests. At construction, this registers the DLL found in the build path.
// At destruction, again registers the DLL found in the build path if another
@@ -34,10 +36,10 @@ class ScopedChromeFrameRegistrar {
static void RegisterDefaults();
private:
- // Contains the path of the most recently registered npchrome_tab.dll.
+ // Contains the path of the most recently registered Chrome Frame DLL.
std::wstring new_chrome_frame_dll_path_;
- // Contains the path of the npchrome_tab.dll to be registered at destruction.
+ // Contains the path of the Chrome Frame DLL to be registered at destruction.
std::wstring original_dll_path_;
};