OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_NPAPI_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_NPAPI_H_ |
6 #define CHROME_FRAME_CHROME_FRAME_NPAPI_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_NPAPI_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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // Implementation of SetProperty, public to allow unittesting. | 122 // Implementation of SetProperty, public to allow unittesting. |
123 bool SetProperty(NPIdentifier name, const NPVariant *variant); | 123 bool SetProperty(NPIdentifier name, const NPVariant *variant); |
124 // Implementation of GetProperty, public to allow unittesting. | 124 // Implementation of GetProperty, public to allow unittesting. |
125 bool GetProperty(NPIdentifier name, NPVariant *variant); | 125 bool GetProperty(NPIdentifier name, NPVariant *variant); |
126 | 126 |
127 // Initialize string->identifier mapping, public to allow unittesting. | 127 // Initialize string->identifier mapping, public to allow unittesting. |
128 static void InitializeIdentifiers(); | 128 static void InitializeIdentifiers(); |
129 | 129 |
130 bool PreProcessContextMenu(HMENU menu); | 130 bool PreProcessContextMenu(HMENU menu); |
131 bool HandleContextMenuCommand(UINT cmd, | 131 bool HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params); |
132 const IPC::MiniContextMenuParams& params); | |
133 protected: | 132 protected: |
134 // Handler for accelerator messages passed on from the hosted chrome | 133 // Handler for accelerator messages passed on from the hosted chrome |
135 // instance. | 134 // instance. |
136 virtual void OnAcceleratorPressed(int tab_handle, const MSG& accel_message); | 135 virtual void OnAcceleratorPressed(int tab_handle, const MSG& accel_message); |
137 virtual void OnTabbedOut(int tab_handle, bool reverse); | 136 virtual void OnTabbedOut(int tab_handle, bool reverse); |
138 virtual void OnOpenURL(int tab_handle, const GURL& url, | 137 virtual void OnOpenURL(int tab_handle, const GURL& url, |
139 const GURL& referrer, int open_disposition); | 138 const GURL& referrer, int open_disposition); |
140 virtual void OnLoad(int tab_handle, const GURL& url); | 139 virtual void OnLoad(int tab_handle, const GURL& url); |
141 virtual void OnMessageFromChromeFrame(int tab_handle, | 140 virtual void OnMessageFromChromeFrame(int tab_handle, |
142 const std::string& message, | 141 const std::string& message, |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // The value of src property keeping the current URL. | 344 // The value of src property keeping the current URL. |
346 std::string src_; | 345 std::string src_; |
347 // Used to fetch network resources when host network stack is in use. | 346 // Used to fetch network resources when host network stack is in use. |
348 NPAPIUrlRequestManager url_fetcher_; | 347 NPAPIUrlRequestManager url_fetcher_; |
349 | 348 |
350 // Set if we receive a navigation request before initializing Chrome. | 349 // Set if we receive a navigation request before initializing Chrome. |
351 bool navigate_after_initialization_; | 350 bool navigate_after_initialization_; |
352 }; | 351 }; |
353 | 352 |
354 #endif // CHROME_FRAME_CHROME_FRAME_NPAPI_H_ | 353 #endif // CHROME_FRAME_CHROME_FRAME_NPAPI_H_ |
OLD | NEW |