diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 01:44:57 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 01:44:57 +0000 |
commit | 1bb5f89e7302cc69f13148651ac6732d89965787 (patch) | |
tree | 430eae76744de12b17912a3eb57d268463991e71 /chrome/browser | |
parent | 311e102fe8a1aaab00a509b4875aeda39ba3b8f4 (diff) | |
download | chromium_src-1bb5f89e7302cc69f13148651ac6732d89965787.zip chromium_src-1bb5f89e7302cc69f13148651ac6732d89965787.tar.gz chromium_src-1bb5f89e7302cc69f13148651ac6732d89965787.tar.bz2 |
Added support for specifying the BrowserFlags DWORD value when we register the ChromeFrame Active Document
server. This allows the document server to receive a number of menu events like Find, View->Text Size, etc.
Thanks to Stoyan for helping me debug this :)
Clicking on Edit->Find in the menu in IE with this causes IEFrame to call our Active document's Exec implementation
with the IDM_FIND command. The handling here is to invoke our default Find handling. Added support for
honoring user text size selections. The next thing to be done is to honor the current text size setting while
launching Chrome.
I also fixed the rgs files to have LF as the terminating character.
This fixes Bug http://code.google.com/p/chromium/issues/detail?id=23667
Bug=23667
Review URL: http://codereview.chromium.org/243082
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 27 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index f7fef6b..38b732e 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -50,8 +50,10 @@ #include "chrome/common/json_value_serializer.h" #include "chrome/common/notification_service.h" #include "chrome/common/platform_util.h" +#include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/test/automation/automation_messages.h" +#include "chrome/test/automation/tab_proxy.h" #include "net/proxy/proxy_service.h" #include "net/proxy/proxy_config_service_fixed.h" #include "net/url_request/url_request_context.h" @@ -429,6 +431,7 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { #if defined(OS_WIN) IPC_MESSAGE_HANDLER(AutomationMsg_ConnectExternalTab, ConnectExternalTab) #endif + IPC_MESSAGE_HANDLER(AutomationMsg_SetPageFontSize, OnSetPageFontSize) IPC_END_MESSAGE_MAP() } @@ -1966,6 +1969,30 @@ void AutomationProvider::StopAsync(int tab_handle) { view->Stop(); } +void AutomationProvider::OnSetPageFontSize(int tab_handle, + int font_size) { + AutomationPageFontSize automation_font_size = + static_cast<AutomationPageFontSize>(font_size); + + if (automation_font_size < SMALLEST_FONT || + automation_font_size > LARGEST_FONT) { + DLOG(ERROR) << "Invalid font size specified : " + << font_size; + return; + } + + if (tab_tracker_->ContainsHandle(tab_handle)) { + NavigationController* tab = tab_tracker_->GetResource(tab_handle); + DCHECK(tab != NULL); + if (tab && tab->tab_contents()) { + DCHECK(tab->tab_contents()->profile() != NULL); + tab->tab_contents()->profile()->GetPrefs()->SetInteger( + prefs::kWebKitDefaultFontSize, font_size); + } + } +} + + void AutomationProvider::WaitForBrowserWindowCountToBecome( int target_count, IPC::Message* reply_message) { if (static_cast<int>(BrowserList::size()) == target_count) { diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 6b72395..ef1f228 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -299,6 +299,8 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, gfx::NativeWindow* tab_window, int* tab_handle); + void OnSetPageFontSize(int tab_handle, int font_size); + void NavigateInExternalTab( int handle, const GURL& url, AutomationMsg_NavigationResponseValues* status); |