| 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 // Implementation of ChromeActiveDocument | 5 // Implementation of ChromeActiveDocument |
| 6 #include "chrome_frame/chrome_active_document.h" | 6 #include "chrome_frame/chrome_active_document.h" |
| 7 | 7 |
| 8 #include <hlink.h> | 8 #include <hlink.h> |
| 9 #include <htiface.h> | 9 #include <htiface.h> |
| 10 #include <initguid.h> | 10 #include <initguid.h> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "base/path_service.h" | 24 #include "base/path_service.h" |
| 25 #include "base/process_util.h" | 25 #include "base/process_util.h" |
| 26 #include "base/string_tokenizer.h" | 26 #include "base/string_tokenizer.h" |
| 27 #include "base/string_util.h" | 27 #include "base/string_util.h" |
| 28 #include "base/thread.h" | 28 #include "base/thread.h" |
| 29 #include "base/thread_local.h" | 29 #include "base/thread_local.h" |
| 30 #include "base/utf_string_conversions.h" | 30 #include "base/utf_string_conversions.h" |
| 31 #include "base/win/scoped_variant.h" | 31 #include "base/win/scoped_variant.h" |
| 32 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
| 33 #include "chrome/app/chrome_dll_resource.h" | 33 #include "chrome/app/chrome_dll_resource.h" |
| 34 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 35 #include "chrome/common/chrome_constants.h" | 34 #include "chrome/common/chrome_constants.h" |
| 36 #include "chrome/common/navigation_types.h" | 35 #include "chrome/common/navigation_types.h" |
| 37 #include "chrome/common/page_zoom.h" | 36 #include "chrome/common/page_zoom.h" |
| 38 #include "chrome/test/automation/browser_proxy.h" | 37 #include "chrome/test/automation/browser_proxy.h" |
| 39 #include "chrome/test/automation/tab_proxy.h" | 38 #include "chrome/test/automation/tab_proxy.h" |
| 40 #include "chrome_frame/bho.h" | 39 #include "chrome_frame/bho.h" |
| 41 #include "chrome_frame/bind_context_info.h" | 40 #include "chrome_frame/bind_context_info.h" |
| 42 #include "chrome_frame/buggy_bho_handling.h" | 41 #include "chrome_frame/buggy_bho_handling.h" |
| 43 #include "chrome_frame/crash_reporting/crash_metrics.h" | 42 #include "chrome_frame/crash_reporting/crash_metrics.h" |
| 44 #include "chrome_frame/utils.h" | 43 #include "chrome_frame/utils.h" |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 MF_ENABLED : MF_DISABLED)); | 962 MF_ENABLED : MF_DISABLED)); |
| 964 EnableMenuItem(menu, IDS_CONTENT_CONTEXT_FORWARD, MF_BYCOMMAND | | 963 EnableMenuItem(menu, IDS_CONTENT_CONTEXT_FORWARD, MF_BYCOMMAND | |
| 965 (SUCCEEDED(travel_log->GetTravelEntry(browser_service, TLOG_FORE, NULL)) ? | 964 (SUCCEEDED(travel_log->GetTravelEntry(browser_service, TLOG_FORE, NULL)) ? |
| 966 MF_ENABLED : MF_DISABLED)); | 965 MF_ENABLED : MF_DISABLED)); |
| 967 | 966 |
| 968 // Call base class (adds 'About' item) | 967 // Call base class (adds 'About' item) |
| 969 return BaseActiveX::PreProcessContextMenu(menu); | 968 return BaseActiveX::PreProcessContextMenu(menu); |
| 970 } | 969 } |
| 971 | 970 |
| 972 bool ChromeActiveDocument::HandleContextMenuCommand(UINT cmd, | 971 bool ChromeActiveDocument::HandleContextMenuCommand(UINT cmd, |
| 973 const IPC::ContextMenuParams& params) { | 972 const IPC::MiniContextMenuParams& params) { |
| 974 ScopedComPtr<IWebBrowser2> web_browser2; | 973 ScopedComPtr<IWebBrowser2> web_browser2; |
| 975 DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive()); | 974 DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive()); |
| 976 | 975 |
| 977 if (cmd == IDC_BACK) | 976 if (cmd == IDC_BACK) |
| 978 web_browser2->GoBack(); | 977 web_browser2->GoBack(); |
| 979 else if (cmd == IDC_FORWARD) | 978 else if (cmd == IDC_FORWARD) |
| 980 web_browser2->GoForward(); | 979 web_browser2->GoForward(); |
| 981 else if (cmd == IDC_RELOAD) | 980 else if (cmd == IDC_RELOAD) |
| 982 web_browser2->Refresh(); | 981 web_browser2->Refresh(); |
| 983 else | 982 else |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 | 1330 |
| 1332 if (new_navigation_info.url != navigation_info_.url) | 1331 if (new_navigation_info.url != navigation_info_.url) |
| 1333 return true; | 1332 return true; |
| 1334 | 1333 |
| 1335 if (new_navigation_info.referrer != navigation_info_.referrer) | 1334 if (new_navigation_info.referrer != navigation_info_.referrer) |
| 1336 return true; | 1335 return true; |
| 1337 | 1336 |
| 1338 return false; | 1337 return false; |
| 1339 } | 1338 } |
| 1340 | 1339 |
| OLD | NEW |