| 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/browser/automation/chrome_frame_automation_provider.h" | 5 #include "chrome/browser/automation/chrome_frame_automation_provider_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/common/automation_messages.h" | 14 #include "chrome/common/automation_messages.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 << " Unhandled message type: " | 76 << " Unhandled message type: " |
| 77 << message.type(); | 77 << message.type(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) { | 80 bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) { |
| 81 bool is_valid_message = false; | 81 bool is_valid_message = false; |
| 82 | 82 |
| 83 switch (type) { | 83 switch (type) { |
| 84 case AutomationMsg_CreateExternalTab::ID: | 84 case AutomationMsg_CreateExternalTab::ID: |
| 85 case AutomationMsg_ConnectExternalTab::ID: | 85 case AutomationMsg_ConnectExternalTab::ID: |
| 86 #if defined(OS_WIN) | |
| 87 case AutomationMsg_BrowserMove::ID: | 86 case AutomationMsg_BrowserMove::ID: |
| 88 case AutomationMsg_ProcessUnhandledAccelerator::ID: | 87 case AutomationMsg_ProcessUnhandledAccelerator::ID: |
| 89 case AutomationMsg_ForwardContextMenuCommandToChrome::ID: | 88 case AutomationMsg_ForwardContextMenuCommandToChrome::ID: |
| 90 #endif // defined(OS_WIN) | |
| 91 #if defined(OS_WIN) | |
| 92 case AutomationMsg_TabReposition::ID: | 89 case AutomationMsg_TabReposition::ID: |
| 93 #endif | |
| 94 case AutomationMsg_NavigateInExternalTab::ID: | 90 case AutomationMsg_NavigateInExternalTab::ID: |
| 95 case AutomationMsg_NavigateExternalTabAtIndex::ID: | 91 case AutomationMsg_NavigateExternalTabAtIndex::ID: |
| 96 case AutomationMsg_Find::ID: | 92 case AutomationMsg_Find::ID: |
| 97 case AutomationMsg_SetInitialFocus::ID: | 93 case AutomationMsg_SetInitialFocus::ID: |
| 98 case AutomationMsg_SetPageFontSize::ID: | 94 case AutomationMsg_SetPageFontSize::ID: |
| 99 case AutomationMsg_SetProxyConfig::ID: | 95 case AutomationMsg_SetProxyConfig::ID: |
| 100 case AutomationMsg_Cut::ID: | 96 case AutomationMsg_Cut::ID: |
| 101 case AutomationMsg_Copy::ID: | 97 case AutomationMsg_Copy::ID: |
| 102 case AutomationMsg_Paste::ID: | 98 case AutomationMsg_Paste::ID: |
| 103 case AutomationMsg_SelectAll::ID: | 99 case AutomationMsg_SelectAll::ID: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 121 default: | 117 default: |
| 122 break; | 118 break; |
| 123 } | 119 } |
| 124 | 120 |
| 125 return is_valid_message; | 121 return is_valid_message; |
| 126 } | 122 } |
| 127 | 123 |
| 128 // static | 124 // static |
| 129 void ChromeFrameAutomationProvider::ReleaseBrowserProcess() { | 125 void ChromeFrameAutomationProvider::ReleaseBrowserProcess() { |
| 130 if (g_browser_process) { | 126 if (g_browser_process) { |
| 131 VLOG(1) << "ChromeFrameAutomationProvider: " | 127 VLOG(1) << "ChromeFrameAutomationProvider: Releasing browser process."; |
| 132 "Releasing browser process."; | |
| 133 g_browser_process->ReleaseModule(); | 128 g_browser_process->ReleaseModule(); |
| 134 } | 129 } |
| 135 } | 130 } |
| OLD | NEW |