Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: forgot rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 // void Paste() override; 636 // void Paste() override;
637 // void SelectAll() override; 637 // void SelectAll() override;
638 void MoveRangeSelectionExtent(const gfx::Point& extent) override; 638 void MoveRangeSelectionExtent(const gfx::Point& extent) override;
639 void SelectRange(const gfx::Point& base, const gfx::Point& extent) override; 639 void SelectRange(const gfx::Point& base, const gfx::Point& extent) override;
640 void AdjustSelectionByCharacterOffset(int start_adjust, int end_adjust) 640 void AdjustSelectionByCharacterOffset(int start_adjust, int end_adjust)
641 override; 641 override;
642 RenderWidgetHostInputEventRouter* GetInputEventRouter() override; 642 RenderWidgetHostInputEventRouter* GetInputEventRouter() override;
643 void ReplicatePageFocus(bool is_focused) override; 643 void ReplicatePageFocus(bool is_focused) override;
644 RenderWidgetHostImpl* GetFocusedRenderWidgetHost( 644 RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
645 RenderWidgetHostImpl* receiving_widget) override; 645 RenderWidgetHostImpl* receiving_widget) override;
646 RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus() override;
647 void EnsureOwningContentsIsFocused(
648 RenderWidgetHostImpl* render_widget_host) override;
646 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, 649 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
647 RendererUnresponsiveType type) override; 650 RendererUnresponsiveType type) override;
648 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override; 651 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override;
649 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, 652 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host,
650 bool user_gesture, 653 bool user_gesture,
651 bool last_unlocked_by_target, 654 bool last_unlocked_by_target,
652 bool privileged) override; 655 bool privileged) override;
653 bool IsFullscreenForCurrentTab() const override; 656 bool IsFullscreenForCurrentTab() const override;
654 blink::WebDisplayMode GetDisplayMode( 657 blink::WebDisplayMode GetDisplayMode(
655 RenderWidgetHostImpl* render_widget_host) const override; 658 RenderWidgetHostImpl* render_widget_host) const override;
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 1002
1000 // Returns the focused WebContents. 1003 // Returns the focused WebContents.
1001 // If there are multiple inner/outer WebContents (when embedding <webview>, 1004 // If there are multiple inner/outer WebContents (when embedding <webview>,
1002 // <guestview>, ...) returns the single one containing the currently focused 1005 // <guestview>, ...) returns the single one containing the currently focused
1003 // frame. Otherwise, returns this WebContents. 1006 // frame. Otherwise, returns this WebContents.
1004 WebContentsImpl* GetFocusedWebContents(); 1007 WebContentsImpl* GetFocusedWebContents();
1005 1008
1006 // Returns the root of the WebContents tree. 1009 // Returns the root of the WebContents tree.
1007 WebContentsImpl* GetOutermostWebContents(); 1010 WebContentsImpl* GetOutermostWebContents();
1008 1011
1012 // Become the focused WebContentsImpl. This will activate this content's main
1013 // frame RenderWidget and indirectly all its subframe widgets.
1014 // GetFocusedRenderWidgetHost will search this WebContentsImpl for a focused
1015 // RenderWidgetHost. The previously focused WebContentsImpl, if any, will have
1016 // its RenderWidgetHosts deactivated.
1017 void SetAsFocusedWebContentsIfNecessary();
1018
1009 // Navigation helpers -------------------------------------------------------- 1019 // Navigation helpers --------------------------------------------------------
1010 // 1020 //
1011 // These functions are helpers for Navigate() and DidNavigate(). 1021 // These functions are helpers for Navigate() and DidNavigate().
1012 1022
1013 // Handles post-navigation tasks in DidNavigate AFTER the entry has been 1023 // Handles post-navigation tasks in DidNavigate AFTER the entry has been
1014 // committed to the navigation controller. Note that the navigation entry is 1024 // committed to the navigation controller. Note that the navigation entry is
1015 // not provided since it may be invalid/changed after being committed. The 1025 // not provided since it may be invalid/changed after being committed. The
1016 // current navigation entry is in the NavigationController at this point. 1026 // current navigation entry is in the NavigationController at this point.
1017 1027
1018 // Helper for CreateNewWidget/CreateNewFullscreenWidget. 1028 // Helper for CreateNewWidget/CreateNewFullscreenWidget.
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 // Adds/removes a callback called on creation of each new WebContents. 1462 // Adds/removes a callback called on creation of each new WebContents.
1453 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1463 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1454 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1464 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1455 1465
1456 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1466 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1457 }; 1467 };
1458 1468
1459 } // namespace content 1469 } // namespace content
1460 1470
1461 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1471 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698