| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // currently focused element (if any). | 360 // currently focused element (if any). |
| 361 static WebPluginContainerImpl* CurrentPluginContainer(LocalFrame*, | 361 static WebPluginContainerImpl* CurrentPluginContainer(LocalFrame*, |
| 362 Node* = nullptr); | 362 Node* = nullptr); |
| 363 | 363 |
| 364 WebViewBase* ViewImpl() const override; | 364 WebViewBase* ViewImpl() const override; |
| 365 | 365 |
| 366 FrameView* GetFrameView() const override { | 366 FrameView* GetFrameView() const override { |
| 367 return GetFrame() ? GetFrame()->View() : 0; | 367 return GetFrame() ? GetFrame()->View() : 0; |
| 368 } | 368 } |
| 369 | 369 |
| 370 WebDevToolsAgentImpl* DevToolsAgentImpl() const { | 370 WebDevToolsAgentImpl* DevToolsAgentImpl() const override { |
| 371 return dev_tools_agent_.Get(); | 371 return dev_tools_agent_.Get(); |
| 372 } | 372 } |
| 373 | 373 |
| 374 // Getters for the impls corresponding to Get(Provisional)DataSource. They | 374 // Getters for the impls corresponding to Get(Provisional)DataSource. They |
| 375 // may return 0 if there is no corresponding data source. | 375 // may return 0 if there is no corresponding data source. |
| 376 WebDataSourceImpl* DataSourceImpl() const; | 376 WebDataSourceImpl* DataSourceImpl() const; |
| 377 WebDataSourceImpl* ProvisionalDataSourceImpl() const; | 377 WebDataSourceImpl* ProvisionalDataSourceImpl() const; |
| 378 | 378 |
| 379 // When a Find operation ends, we want to set the selection to what was active | 379 // When a Find operation ends, we want to set the selection to what was active |
| 380 // and set focus to the first focusable node we find (starting with the first | 380 // and set focus to the first focusable node we find (starting with the first |
| 381 // node in the matched range and going up the inheritance chain). If we find | 381 // node in the matched range and going up the inheritance chain). If we find |
| 382 // nothing to focus we focus the first focusable node in the range. This | 382 // nothing to focus we focus the first focusable node in the range. This |
| 383 // allows us to set focus to a link (when we find text inside a link), which | 383 // allows us to set focus to a link (when we find text inside a link), which |
| 384 // allows us to navigate by pressing Enter after closing the Find box. | 384 // allows us to navigate by pressing Enter after closing the Find box. |
| 385 void SetFindEndstateFocusAndSelection(); | 385 void SetFindEndstateFocusAndSelection(); |
| 386 | 386 |
| 387 void DidFail(const ResourceError&, bool was_provisional, HistoryCommitType); | 387 void DidFail(const ResourceError&, bool was_provisional, HistoryCommitType); |
| 388 void DidFinish(); | 388 void DidFinish(); |
| 389 | 389 |
| 390 // Sets whether the WebLocalFrameImpl allows its document to be scrolled. | 390 // Sets whether the WebLocalFrameImpl allows its document to be scrolled. |
| 391 // If the parameter is true, allow the document to be scrolled. | 391 // If the parameter is true, allow the document to be scrolled. |
| 392 // Otherwise, disallow scrolling. | 392 // Otherwise, disallow scrolling. |
| 393 void SetCanHaveScrollbars(bool) override; | 393 void SetCanHaveScrollbars(bool) override; |
| 394 | 394 |
| 395 WebFrameClient* Client() const override { return client_; } | 395 WebFrameClient* Client() const override { return client_; } |
| 396 void SetClient(WebFrameClient* client) { client_ = client; } | 396 void SetClient(WebFrameClient* client) override { client_ = client; } |
| 397 | 397 |
| 398 ContentSettingsClient& GetContentSettingsClient() { | 398 ContentSettingsClient& GetContentSettingsClient() { |
| 399 return content_settings_client_; | 399 return content_settings_client_; |
| 400 } | 400 } |
| 401 | 401 |
| 402 SharedWorkerRepositoryClientImpl* SharedWorkerRepositoryClient() const { | 402 SharedWorkerRepositoryClientImpl* SharedWorkerRepositoryClient() const { |
| 403 return shared_worker_repository_client_.get(); | 403 return shared_worker_repository_client_.get(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void SetInputEventsTransformForEmulation(const IntSize&, float); | 406 void SetInputEventsTransformForEmulation(const IntSize&, float); |
| 407 | 407 |
| 408 static void SelectWordAroundPosition(LocalFrame*, VisiblePosition); | 408 static void SelectWordAroundPosition(LocalFrame*, VisiblePosition); |
| 409 | 409 |
| 410 TextCheckerClient& GetTextCheckerClient() const; | 410 TextCheckerClient& GetTextCheckerClient() const; |
| 411 WebTextCheckClient* TextCheckClient() const override { | 411 WebTextCheckClient* TextCheckClient() const override { |
| 412 return text_check_client_; | 412 return text_check_client_; |
| 413 } | 413 } |
| 414 | 414 |
| 415 TextFinder* GetTextFinder() const; | 415 TextFinder* GetTextFinder() const; |
| 416 // Returns the text finder object if it already exists. | 416 // Returns the text finder object if it already exists. |
| 417 // Otherwise creates it and then returns. | 417 // Otherwise creates it and then returns. |
| 418 TextFinder& EnsureTextFinder(); | 418 TextFinder& EnsureTextFinder() override; |
| 419 | 419 |
| 420 // Returns a hit-tested VisiblePosition for the given point | 420 // Returns a hit-tested VisiblePosition for the given point |
| 421 VisiblePosition VisiblePositionForViewportPoint(const WebPoint&); | 421 VisiblePosition VisiblePositionForViewportPoint(const WebPoint&); |
| 422 | 422 |
| 423 void SetFrameWidget(WebFrameWidgetBase*); | 423 void SetFrameWidget(WebFrameWidgetBase*) override; |
| 424 | 424 |
| 425 // DevTools front-end bindings. | 425 // DevTools front-end bindings. |
| 426 void SetDevToolsFrontend(WebDevToolsFrontendImpl* frontend) { | 426 void SetDevToolsFrontend(WebDevToolsFrontendImpl* frontend) { |
| 427 web_dev_tools_frontend_ = frontend; | 427 web_dev_tools_frontend_ = frontend; |
| 428 } | 428 } |
| 429 WebDevToolsFrontendImpl* DevToolsFrontend() { | 429 WebDevToolsFrontendImpl* DevToolsFrontend() { |
| 430 return web_dev_tools_frontend_; | 430 return web_dev_tools_frontend_; |
| 431 } | 431 } |
| 432 | 432 |
| 433 WebNode ContextMenuNode() const { return context_menu_node_.Get(); } | 433 WebNode ContextMenuNode() const { return context_menu_node_.Get(); } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 | 524 |
| 525 DEFINE_TYPE_CASTS(WebLocalFrameImpl, | 525 DEFINE_TYPE_CASTS(WebLocalFrameImpl, |
| 526 WebFrame, | 526 WebFrame, |
| 527 frame, | 527 frame, |
| 528 frame->IsWebLocalFrame(), | 528 frame->IsWebLocalFrame(), |
| 529 frame.IsWebLocalFrame()); | 529 frame.IsWebLocalFrame()); |
| 530 | 530 |
| 531 } // namespace blink | 531 } // namespace blink |
| 532 | 532 |
| 533 #endif | 533 #endif |
| OLD | NEW |