| 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_ACTIVE_DOCUMENT_H_ | 5 #ifndef CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ |
| 6 #define CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ | 6 #define CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <atlctl.h> | 10 #include <atlctl.h> |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 COM_INTERFACE_ENTRY(IHTMLWindow2) | 229 COM_INTERFACE_ENTRY(IHTMLWindow2) |
| 230 COM_INTERFACE_ENTRY(IHTMLPrivateWindow) | 230 COM_INTERFACE_ENTRY(IHTMLPrivateWindow) |
| 231 COM_INTERFACE_ENTRY(IEnumPrivacyRecords) | 231 COM_INTERFACE_ENTRY(IEnumPrivacyRecords) |
| 232 COM_INTERFACE_ENTRY_CHAIN(BaseActiveX) | 232 COM_INTERFACE_ENTRY_CHAIN(BaseActiveX) |
| 233 END_COM_MAP() | 233 END_COM_MAP() |
| 234 | 234 |
| 235 BEGIN_MSG_MAP(ChromeActiveDocument) | 235 BEGIN_MSG_MAP(ChromeActiveDocument) |
| 236 MESSAGE_HANDLER(WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, OnFirePrivacyChange) | 236 MESSAGE_HANDLER(WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, OnFirePrivacyChange) |
| 237 COMMAND_ID_HANDLER(IDC_CHROMEFRAME_FORWARD, OnForward) | 237 COMMAND_ID_HANDLER(IDC_CHROMEFRAME_FORWARD, OnForward) |
| 238 COMMAND_ID_HANDLER(IDC_CHROMEFRAME_BACK, OnBack) | 238 COMMAND_ID_HANDLER(IDC_CHROMEFRAME_BACK, OnBack) |
| 239 MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) |
| 240 MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) |
| 239 CHAIN_MSG_MAP(BaseActiveX) | 241 CHAIN_MSG_MAP(BaseActiveX) |
| 240 END_MSG_MAP() | 242 END_MSG_MAP() |
| 241 | 243 |
| 242 HRESULT FinalConstruct(); | 244 HRESULT FinalConstruct(); |
| 243 | 245 |
| 244 #define FORWARD_TAB_COMMAND(group, id, command) \ | 246 #define FORWARD_TAB_COMMAND(group, id, command) \ |
| 245 EXEC_COMMAND_HANDLER_GENERIC(group, id, GetTabProxy() ? \ | 247 EXEC_COMMAND_HANDLER_GENERIC(group, id, GetTabProxy() ? \ |
| 246 GetTabProxy()->command() : 1) | 248 GetTabProxy()->command() : 1) |
| 247 | 249 |
| 248 BEGIN_EXEC_COMMAND_MAP(ChromeActiveDocument) | 250 BEGIN_EXEC_COMMAND_MAP(ChromeActiveDocument) |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 335 |
| 334 // ChromeFrameActivexBase overrides | 336 // ChromeFrameActivexBase overrides |
| 335 HRESULT IOleObject_SetClientSite(IOleClientSite* client_site); | 337 HRESULT IOleObject_SetClientSite(IOleClientSite* client_site); |
| 336 | 338 |
| 337 HRESULT ActiveXDocActivate(LONG verb); | 339 HRESULT ActiveXDocActivate(LONG verb); |
| 338 | 340 |
| 339 // Callbacks from ChromeFramePlugin<T> | 341 // Callbacks from ChromeFramePlugin<T> |
| 340 bool PreProcessContextMenu(HMENU menu); | 342 bool PreProcessContextMenu(HMENU menu); |
| 341 bool HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params); | 343 bool HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params); |
| 342 | 344 |
| 343 // ChromeFramePlugin overrides. | 345 // ChromeFramePlugin overrides. |
| 344 virtual void OnAutomationServerReady(); | 346 virtual void OnAutomationServerReady(); |
| 345 | 347 |
| 346 // IEnumPrivacyRecords | 348 // IEnumPrivacyRecords |
| 347 STDMETHOD(Reset)(); | 349 STDMETHOD(Reset)(); |
| 348 STDMETHOD(GetSize)(ULONG* size); | 350 STDMETHOD(GetSize)(ULONG* size); |
| 349 STDMETHOD(GetPrivacyImpacted)(BOOL* privacy_impacted); | 351 STDMETHOD(GetPrivacyImpacted)(BOOL* privacy_impacted); |
| 350 STDMETHOD(Next)(BSTR* url, BSTR* policy, LONG* reserved, DWORD* flags); | 352 STDMETHOD(Next)(BSTR* url, BSTR* policy, LONG* reserved, DWORD* flags); |
| 351 | 353 |
| 352 protected: | 354 protected: |
| 353 // ChromeFrameActivexBase overrides | 355 // ChromeFrameActivexBase overrides |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 // Get the travel log from the client site | 416 // Get the travel log from the client site |
| 415 HRESULT GetBrowserServiceAndTravelLog(IBrowserService** browser_service, | 417 HRESULT GetBrowserServiceAndTravelLog(IBrowserService** browser_service, |
| 416 ITravelLog** travel_log); | 418 ITravelLog** travel_log); |
| 417 LRESULT OnForward(WORD notify_code, WORD id, HWND control_window, | 419 LRESULT OnForward(WORD notify_code, WORD id, HWND control_window, |
| 418 BOOL& bHandled); | 420 BOOL& bHandled); |
| 419 LRESULT OnBack(WORD notify_code, WORD id, HWND control_window, | 421 LRESULT OnBack(WORD notify_code, WORD id, HWND control_window, |
| 420 BOOL& bHandled); | 422 BOOL& bHandled); |
| 421 | 423 |
| 422 LRESULT OnFirePrivacyChange(UINT message, WPARAM wparam, LPARAM lparam, | 424 LRESULT OnFirePrivacyChange(UINT message, WPARAM wparam, LPARAM lparam, |
| 423 BOOL& handled); | 425 BOOL& handled); |
| 426 LRESULT OnShowWindow(UINT message, WPARAM wparam, LPARAM lparam, |
| 427 BOOL& handled); |
| 428 LRESULT OnSetFocus(UINT message, WPARAM wparam, LPARAM lparam, |
| 429 BOOL& handled); |
| 424 | 430 |
| 425 // Checks for the presence of known-to-be-buggy BHOs. If we find any | 431 // Checks for the presence of known-to-be-buggy BHOs. If we find any |
| 426 // we do not fire the DocumentComplete event to avoid a crash. | 432 // we do not fire the DocumentComplete event to avoid a crash. |
| 427 static bool ShouldFireDocumentComplete(); | 433 static bool ShouldFireDocumentComplete(); |
| 428 | 434 |
| 429 protected: | 435 protected: |
| 430 typedef std::map<int, bool> EnabledCommandsMap; | 436 typedef std::map<int, bool> EnabledCommandsMap; |
| 431 | 437 |
| 432 IPC::NavigationInfo navigation_info_; | 438 IPC::NavigationInfo navigation_info_; |
| 433 bool is_doc_object_; | 439 bool is_doc_object_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 463 // Dimensions of the window. Used only when opening popups. | 469 // Dimensions of the window. Used only when opening popups. |
| 464 gfx::Rect dimensions_; | 470 gfx::Rect dimensions_; |
| 465 // Set to true if the document was loaded by a window.open in chrome. | 471 // Set to true if the document was loaded by a window.open in chrome. |
| 466 bool is_new_navigation_; | 472 bool is_new_navigation_; |
| 467 public: | 473 public: |
| 468 ScopedComPtr<IOleInPlaceFrame> in_place_frame_; | 474 ScopedComPtr<IOleInPlaceFrame> in_place_frame_; |
| 469 OLEINPLACEFRAMEINFO frame_info_; | 475 OLEINPLACEFRAMEINFO frame_info_; |
| 470 }; | 476 }; |
| 471 | 477 |
| 472 #endif // CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ | 478 #endif // CHROME_FRAME_CHROME_ACTIVE_DOCUMENT_H_ |
| OLD | NEW |