| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
| 6 #define CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlwin.h> | 9 #include <atlwin.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 route_all_top_level_navigations_ = route_all_top_level_navigations; | 452 route_all_top_level_navigations_ = route_all_top_level_navigations; |
| 453 } | 453 } |
| 454 | 454 |
| 455 protected: | 455 protected: |
| 456 // ChromeFrameAutomationProxy::LaunchDelegate implementation. | 456 // ChromeFrameAutomationProxy::LaunchDelegate implementation. |
| 457 virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, | 457 virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, |
| 458 AutomationLaunchResult result); | 458 AutomationLaunchResult result); |
| 459 virtual void AutomationServerDied(); | 459 virtual void AutomationServerDied(); |
| 460 | 460 |
| 461 // TabProxyDelegate implementation | 461 // TabProxyDelegate implementation |
| 462 virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg); | 462 virtual bool OnMessageReceived(TabProxy* tab, const IPC::Message& msg); |
| 463 virtual void OnChannelError(TabProxy* tab); | 463 virtual void OnChannelError(TabProxy* tab); |
| 464 | 464 |
| 465 void CreateExternalTab(); | 465 void CreateExternalTab(); |
| 466 AutomationLaunchResult CreateExternalTabComplete(HWND chrome_window, | 466 AutomationLaunchResult CreateExternalTabComplete(HWND chrome_window, |
| 467 HWND tab_window, | 467 HWND tab_window, |
| 468 int tab_handle, | 468 int tab_handle, |
| 469 int session_id); | 469 int session_id); |
| 470 // Called in UI thread. Here we fire event to the client notifying for | 470 // Called in UI thread. Here we fire event to the client notifying for |
| 471 // the result of Initialize() method call. | 471 // the result of Initialize() method call. |
| 472 void InitializeComplete(AutomationLaunchResult result); | 472 void InitializeComplete(AutomationLaunchResult result); |
| 473 | 473 |
| 474 virtual void OnFinalMessage(HWND wnd) { | 474 virtual void OnFinalMessage(HWND wnd) { |
| 475 Release(); | 475 Release(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 scoped_refptr<ChromeFrameLaunchParams> launch_params() { | 478 scoped_refptr<ChromeFrameLaunchParams> launch_params() { |
| 479 return chrome_launch_params_; | 479 return chrome_launch_params_; |
| 480 } | 480 } |
| 481 | 481 |
| 482 private: | 482 private: |
| 483 void OnMessageReceivedUIThread(const IPC::Message& msg); | 483 bool OnMessageReceivedUIThread(const IPC::Message& msg); |
| 484 void OnChannelErrorUIThread(); | 484 void OnChannelErrorUIThread(); |
| 485 | 485 |
| 486 HWND chrome_window() const { return chrome_window_; } | 486 HWND chrome_window() const { return chrome_window_; } |
| 487 void BeginNavigate(); | 487 void BeginNavigate(); |
| 488 void BeginNavigateCompleted(AutomationMsg_NavigationResponseValues result); | 488 void BeginNavigateCompleted(AutomationMsg_NavigationResponseValues result); |
| 489 | 489 |
| 490 // Helpers | 490 // Helpers |
| 491 void ReportNavigationError(AutomationMsg_NavigationResponseValues error_code, | 491 void ReportNavigationError(AutomationMsg_NavigationResponseValues error_code, |
| 492 const std::string& url); | 492 const std::string& url); |
| 493 | 493 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // set to true if the host needs to get notified of all top level navigations | 559 // set to true if the host needs to get notified of all top level navigations |
| 560 // in this page. This typically applies to hosts which would render the new | 560 // in this page. This typically applies to hosts which would render the new |
| 561 // page without chrome frame. Defaults to false. | 561 // page without chrome frame. Defaults to false. |
| 562 bool route_all_top_level_navigations_; | 562 bool route_all_top_level_navigations_; |
| 563 | 563 |
| 564 friend class BeginNavigateContext; | 564 friend class BeginNavigateContext; |
| 565 friend class CreateExternalTabContext; | 565 friend class CreateExternalTabContext; |
| 566 }; | 566 }; |
| 567 | 567 |
| 568 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 568 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
| OLD | NEW |