OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 virtual blink::WebWorkerPermissionClientProxy* | 194 virtual blink::WebWorkerPermissionClientProxy* |
195 createWorkerPermissionClientProxy(blink::WebFrame* frame); | 195 createWorkerPermissionClientProxy(blink::WebFrame* frame); |
196 virtual blink::WebCookieJar* cookieJar(blink::WebFrame* frame); | 196 virtual blink::WebCookieJar* cookieJar(blink::WebFrame* frame); |
197 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( | 197 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
198 blink::WebFrame* frame); | 198 blink::WebFrame* frame); |
199 virtual void didAccessInitialDocument(blink::WebFrame* frame); | 199 virtual void didAccessInitialDocument(blink::WebFrame* frame); |
200 virtual blink::WebFrame* createChildFrame(blink::WebFrame* parent, | 200 virtual blink::WebFrame* createChildFrame(blink::WebFrame* parent, |
201 const blink::WebString& name); | 201 const blink::WebString& name); |
202 virtual void didDisownOpener(blink::WebFrame* frame); | 202 virtual void didDisownOpener(blink::WebFrame* frame); |
203 virtual void frameDetached(blink::WebFrame* frame); | 203 virtual void frameDetached(blink::WebFrame* frame); |
| 204 virtual void frameFocused(); |
204 virtual void willClose(blink::WebFrame* frame); | 205 virtual void willClose(blink::WebFrame* frame); |
205 virtual void didChangeName(blink::WebFrame* frame, | 206 virtual void didChangeName(blink::WebFrame* frame, |
206 const blink::WebString& name); | 207 const blink::WebString& name); |
207 virtual void didMatchCSS( | 208 virtual void didMatchCSS( |
208 blink::WebFrame* frame, | 209 blink::WebFrame* frame, |
209 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 210 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
210 const blink::WebVector<blink::WebString>& stopped_matching_selectors); | 211 const blink::WebVector<blink::WebString>& stopped_matching_selectors); |
211 virtual void loadURLExternally(blink::WebFrame* frame, | 212 virtual void loadURLExternally(blink::WebFrame* frame, |
212 const blink::WebURLRequest& request, | 213 const blink::WebURLRequest& request, |
213 blink::WebNavigationPolicy policy); | 214 blink::WebNavigationPolicy policy); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 ShouldUpdateSelectionTextFromContextMenuParams); | 344 ShouldUpdateSelectionTextFromContextMenuParams); |
344 | 345 |
345 typedef std::map<GURL, double> HostZoomLevels; | 346 typedef std::map<GURL, double> HostZoomLevels; |
346 | 347 |
347 // Functions to add and remove observers for this object. | 348 // Functions to add and remove observers for this object. |
348 void AddObserver(RenderFrameObserver* observer); | 349 void AddObserver(RenderFrameObserver* observer); |
349 void RemoveObserver(RenderFrameObserver* observer); | 350 void RemoveObserver(RenderFrameObserver* observer); |
350 | 351 |
351 void UpdateURL(blink::WebFrame* frame); | 352 void UpdateURL(blink::WebFrame* frame); |
352 | 353 |
| 354 // Gets the focused element. If no such element exists then the element will |
| 355 // be NULL. |
| 356 blink::WebElement GetFocusedElement(); |
| 357 |
353 // IPC message handlers ------------------------------------------------------ | 358 // IPC message handlers ------------------------------------------------------ |
354 // | 359 // |
355 // The documentation for these functions should be in | 360 // The documentation for these functions should be in |
356 // content/common/*_messages.h for the message that the function is handling. | 361 // content/common/*_messages.h for the message that the function is handling. |
357 void OnSwapOut(); | 362 void OnSwapOut(); |
358 void OnChildFrameProcessGone(); | 363 void OnChildFrameProcessGone(); |
359 void OnBuffersSwapped(const FrameMsg_BuffersSwapped_Params& params); | 364 void OnBuffersSwapped(const FrameMsg_BuffersSwapped_Params& params); |
360 void OnCompositorFrameSwapped(const IPC::Message& message); | 365 void OnCompositorFrameSwapped(const IPC::Message& message); |
361 void OnShowContextMenu(const gfx::Point& location); | 366 void OnShowContextMenu(const gfx::Point& location); |
362 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); | 367 void OnContextMenuClosed(const CustomContextMenuContext& custom_context); |
363 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, | 368 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, |
364 unsigned action); | 369 unsigned action); |
| 370 void OnCut(); |
| 371 void OnCopy(); |
| 372 void OnPaste(); |
365 void OnCSSInsertRequest(const std::string& css); | 373 void OnCSSInsertRequest(const std::string& css); |
| 374 |
366 // Virtual since overridden by WebTestProxy for layout tests. | 375 // Virtual since overridden by WebTestProxy for layout tests. |
367 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( | 376 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( |
368 RenderFrame* render_frame, | 377 RenderFrame* render_frame, |
369 blink::WebFrame* frame, | 378 blink::WebFrame* frame, |
370 blink::WebDataSource::ExtraData* extraData, | 379 blink::WebDataSource::ExtraData* extraData, |
371 const blink::WebURLRequest& request, | 380 const blink::WebURLRequest& request, |
372 blink::WebNavigationType type, | 381 blink::WebNavigationType type, |
373 blink::WebNavigationPolicy default_policy, | 382 blink::WebNavigationPolicy default_policy, |
374 bool is_redirect); | 383 bool is_redirect); |
375 void OpenURL(blink::WebFrame* frame, | 384 void OpenURL(blink::WebFrame* frame, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 // always respond properly to the request, so we don't have to worry so | 427 // always respond properly to the request, so we don't have to worry so |
419 // much about leaks. | 428 // much about leaks. |
420 IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_; | 429 IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_; |
421 | 430 |
422 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 431 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
423 }; | 432 }; |
424 | 433 |
425 } // namespace content | 434 } // namespace content |
426 | 435 |
427 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 436 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |