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

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

Issue 2451143003: <webview>: Correctly shift focus between WebContents. (Closed)
Patch Set: Fix creis comments. 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 // void Paste() override; 639 // void Paste() override;
640 // void SelectAll() override; 640 // void SelectAll() override;
641 void MoveRangeSelectionExtent(const gfx::Point& extent) override; 641 void MoveRangeSelectionExtent(const gfx::Point& extent) override;
642 void SelectRange(const gfx::Point& base, const gfx::Point& extent) override; 642 void SelectRange(const gfx::Point& base, const gfx::Point& extent) override;
643 void AdjustSelectionByCharacterOffset(int start_adjust, int end_adjust) 643 void AdjustSelectionByCharacterOffset(int start_adjust, int end_adjust)
644 override; 644 override;
645 RenderWidgetHostInputEventRouter* GetInputEventRouter() override; 645 RenderWidgetHostInputEventRouter* GetInputEventRouter() override;
646 void ReplicatePageFocus(bool is_focused) override; 646 void ReplicatePageFocus(bool is_focused) override;
647 RenderWidgetHostImpl* GetFocusedRenderWidgetHost( 647 RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
648 RenderWidgetHostImpl* receiving_widget) override; 648 RenderWidgetHostImpl* receiving_widget) override;
649 RenderWidgetHostImpl* GetRenderWidgetHostWithPageFocus() override;
650 void FocusOwningWebContents(
651 RenderWidgetHostImpl* render_widget_host) override;
649 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, 652 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
650 RendererUnresponsiveType type) override; 653 RendererUnresponsiveType type) override;
651 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override; 654 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override;
652 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, 655 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host,
653 bool user_gesture, 656 bool user_gesture,
654 bool last_unlocked_by_target, 657 bool last_unlocked_by_target,
655 bool privileged) override; 658 bool privileged) override;
656 bool IsFullscreenForCurrentTab() const override; 659 bool IsFullscreenForCurrentTab() const override;
657 blink::WebDisplayMode GetDisplayMode( 660 blink::WebDisplayMode GetDisplayMode(
658 RenderWidgetHostImpl* render_widget_host) const override; 661 RenderWidgetHostImpl* render_widget_host) const override;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 // response. This won't actually update the throbber, but it will get picked 1004 // response. This won't actually update the throbber, but it will get picked
1002 // up at the next animation step if the throbber is going. 1005 // up at the next animation step if the throbber is going.
1003 void SetNotWaitingForResponse() { waiting_for_response_ = false; } 1006 void SetNotWaitingForResponse() { waiting_for_response_ = false; }
1004 1007
1005 // Returns the focused WebContents. 1008 // Returns the focused WebContents.
1006 // If there are multiple inner/outer WebContents (when embedding <webview>, 1009 // If there are multiple inner/outer WebContents (when embedding <webview>,
1007 // <guestview>, ...) returns the single one containing the currently focused 1010 // <guestview>, ...) returns the single one containing the currently focused
1008 // frame. Otherwise, returns this WebContents. 1011 // frame. Otherwise, returns this WebContents.
1009 WebContentsImpl* GetFocusedWebContents(); 1012 WebContentsImpl* GetFocusedWebContents();
1010 1013
1014 // Returns true if |this| is the focused WebContents or an ancestor of the
1015 // focused WebContents.
1016 bool ContainsOrIsFocusedWebContents();
1017
1011 // Returns the root of the WebContents tree. 1018 // Returns the root of the WebContents tree.
1012 WebContentsImpl* GetOutermostWebContents(); 1019 WebContentsImpl* GetOutermostWebContents();
1013 1020
1021 // When inner or outer WebContents are present, become the focused
1022 // WebContentsImpl. This will activate this content's main frame RenderWidget
1023 // and indirectly all its subframe widgets. GetFocusedRenderWidgetHost will
1024 // search this WebContentsImpl for a focused RenderWidgetHost. The previously
1025 // focused WebContentsImpl, if any, will have its RenderWidgetHosts
1026 // deactivated.
1027 void SetAsFocusedWebContentsIfNecessary();
1028
1014 // Navigation helpers -------------------------------------------------------- 1029 // Navigation helpers --------------------------------------------------------
1015 // 1030 //
1016 // These functions are helpers for Navigate() and DidNavigate(). 1031 // These functions are helpers for Navigate() and DidNavigate().
1017 1032
1018 // Handles post-navigation tasks in DidNavigate AFTER the entry has been 1033 // Handles post-navigation tasks in DidNavigate AFTER the entry has been
1019 // committed to the navigation controller. Note that the navigation entry is 1034 // committed to the navigation controller. Note that the navigation entry is
1020 // not provided since it may be invalid/changed after being committed. The 1035 // not provided since it may be invalid/changed after being committed. The
1021 // current navigation entry is in the NavigationController at this point. 1036 // current navigation entry is in the NavigationController at this point.
1022 1037
1023 // Helper for CreateNewWidget/CreateNewFullscreenWidget. 1038 // Helper for CreateNewWidget/CreateNewFullscreenWidget.
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 // Adds/removes a callback called on creation of each new WebContents. 1472 // Adds/removes a callback called on creation of each new WebContents.
1458 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1473 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1459 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1474 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1460 1475
1461 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1476 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1462 }; 1477 };
1463 1478
1464 } // namespace content 1479 } // namespace content
1465 1480
1466 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1481 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698