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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 860393004: Expose whether a frame is focused to the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up Created 5 years, 11 months 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 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 RenderProcessHost* GetProcess() override; 127 RenderProcessHost* GetProcess() override;
128 RenderFrameHost* GetParent() override; 128 RenderFrameHost* GetParent() override;
129 const std::string& GetFrameName() override; 129 const std::string& GetFrameName() override;
130 bool IsCrossProcessSubframe() override; 130 bool IsCrossProcessSubframe() override;
131 GURL GetLastCommittedURL() override; 131 GURL GetLastCommittedURL() override;
132 gfx::NativeView GetNativeView() override; 132 gfx::NativeView GetNativeView() override;
133 void ExecuteJavaScript(const base::string16& javascript) override; 133 void ExecuteJavaScript(const base::string16& javascript) override;
134 void ExecuteJavaScript(const base::string16& javascript, 134 void ExecuteJavaScript(const base::string16& javascript,
135 const JavaScriptResultCallback& callback) override; 135 const JavaScriptResultCallback& callback) override;
136 void ExecuteJavaScriptForTests(const base::string16& javascript) override; 136 void ExecuteJavaScriptForTests(const base::string16& javascript) override;
137 void ActivateFindInPageResultForAccessibility(int request_id) override;
137 RenderViewHost* GetRenderViewHost() override; 138 RenderViewHost* GetRenderViewHost() override;
138 ServiceRegistry* GetServiceRegistry() override; 139 ServiceRegistry* GetServiceRegistry() override;
139 void ActivateFindInPageResultForAccessibility(int request_id) override;
140 140
141 // IPC::Sender 141 // IPC::Sender
142 bool Send(IPC::Message* msg) override; 142 bool Send(IPC::Message* msg) override;
143 143
144 // IPC::Listener 144 // IPC::Listener
145 bool OnMessageReceived(const IPC::Message& msg) override; 145 bool OnMessageReceived(const IPC::Message& msg) override;
146 146
147 // BrowserAccessibilityDelegate 147 // BrowserAccessibilityDelegate
148 void AccessibilitySetFocus(int acc_obj_id) override; 148 void AccessibilitySetFocus(int acc_obj_id) override;
149 void AccessibilityDoDefaultAction(int acc_obj_id) override; 149 void AccessibilityDoDefaultAction(int acc_obj_id) override;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 const CommitNavigationParams& commit_params); 398 const CommitNavigationParams& commit_params);
399 399
400 // Sets up the Mojo connection between this instance and its associated render 400 // Sets up the Mojo connection between this instance and its associated render
401 // frame if it has not yet been set up. 401 // frame if it has not yet been set up.
402 void SetUpMojoIfNeeded(); 402 void SetUpMojoIfNeeded();
403 403
404 // Tears down the browser-side state relating to the Mojo connection between 404 // Tears down the browser-side state relating to the Mojo connection between
405 // this instance and its associated render frame. 405 // this instance and its associated render frame.
406 void InvalidateMojoConnection(); 406 void InvalidateMojoConnection();
407 407
408 // Returns whether the frame is focused. A frame is considered focused when it
409 // is the parent chain of the focused frame within the frame tree and its
kenrb 2015/01/23 18:40:12 nit: "it is *in* the parent chain" More generally
mlamouri (slow - plz ping) 2015/01/26 14:02:18 I re-worded a bit.
410 // associated RenderWidgetHost is also focused.
411 bool IsFocused();
412
408 protected: 413 protected:
409 friend class RenderFrameHostFactory; 414 friend class RenderFrameHostFactory;
410 415
411 // |flags| is a combination of CreateRenderFrameFlags. 416 // |flags| is a combination of CreateRenderFrameFlags.
412 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 417 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
413 // should be the abstraction needed here, but we need RenderViewHost to pass 418 // should be the abstraction needed here, but we need RenderViewHost to pass
414 // into WebContentsObserver::FrameDetached for now. 419 // into WebContentsObserver::FrameDetached for now.
415 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 420 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
416 RenderFrameHostDelegate* delegate, 421 RenderFrameHostDelegate* delegate,
417 RenderWidgetHostDelegate* rwh_delegate, 422 RenderWidgetHostDelegate* rwh_delegate,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 654
650 // NOTE: This must be the last member. 655 // NOTE: This must be the last member.
651 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 656 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
652 657
653 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 658 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
654 }; 659 };
655 660
656 } // namespace content 661 } // namespace content
657 662
658 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 663 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698