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 #include "chrome_frame/chrome_frame_automation.h" | 5 #include "chrome_frame/chrome_frame_automation.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 FindInPageCase match_case, | 646 FindInPageCase match_case, |
647 bool find_next) { | 647 bool find_next) { |
648 // Note that we can be called by the find dialog after the tab has gone away. | 648 // Note that we can be called by the find dialog after the tab has gone away. |
649 if (!tab_) | 649 if (!tab_) |
650 return; | 650 return; |
651 | 651 |
652 // What follows is quite similar to TabProxy::FindInPage() but uses | 652 // What follows is quite similar to TabProxy::FindInPage() but uses |
653 // the SyncMessageReplyDispatcher to avoid concerns about blocking | 653 // the SyncMessageReplyDispatcher to avoid concerns about blocking |
654 // synchronous messages. | 654 // synchronous messages. |
655 AutomationMsg_Find_Params params; | 655 AutomationMsg_Find_Params params; |
656 params.search_string = WideToUTF16Hack(search_string); | 656 params.search_string = base::WideToUTF16Hack(search_string); |
657 params.find_next = find_next; | 657 params.find_next = find_next; |
658 params.match_case = (match_case == CASE_SENSITIVE); | 658 params.match_case = (match_case == CASE_SENSITIVE); |
659 params.forward = (forward == FWD); | 659 params.forward = (forward == FWD); |
660 | 660 |
661 IPC::SyncMessage* msg = | 661 IPC::SyncMessage* msg = |
662 new AutomationMsg_Find(tab_->handle(), params, NULL, NULL); | 662 new AutomationMsg_Find(tab_->handle(), params, NULL, NULL); |
663 automation_server_->SendAsAsync(msg, NULL, this); | 663 automation_server_->SendAsAsync(msg, NULL, this); |
664 } | 664 } |
665 | 665 |
666 // Invoked in the automation proxy's worker thread. | 666 // Invoked in the automation proxy's worker thread. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 new AutomationMsg_SetPageFontSize(tab_handle_, font_size)); | 838 new AutomationMsg_SetPageFontSize(tab_handle_, font_size)); |
839 } | 839 } |
840 | 840 |
841 void ChromeFrameAutomationClient::SetUrlFetcher( | 841 void ChromeFrameAutomationClient::SetUrlFetcher( |
842 PluginUrlRequestManager* url_fetcher) { | 842 PluginUrlRequestManager* url_fetcher) { |
843 DCHECK(url_fetcher != NULL); | 843 DCHECK(url_fetcher != NULL); |
844 url_fetcher_ = url_fetcher; | 844 url_fetcher_ = url_fetcher; |
845 url_fetcher_flags_ = url_fetcher->GetThreadSafeFlags(); | 845 url_fetcher_flags_ = url_fetcher->GetThreadSafeFlags(); |
846 url_fetcher_->set_delegate(this); | 846 url_fetcher_->set_delegate(this); |
847 } | 847 } |
OLD | NEW |