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

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

Issue 871443004: Expose the visibility state of a frame to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rfh_isfocused
Patch Set: rebase Created 5 years, 10 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
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "content/browser/accessibility/browser_accessibility_manager.h" 17 #include "content/browser/accessibility/browser_accessibility_manager.h"
18 #include "content/browser/site_instance_impl.h" 18 #include "content/browser/site_instance_impl.h"
19 #include "content/common/accessibility_mode_enums.h" 19 #include "content/common/accessibility_mode_enums.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
21 #include "content/common/frame_message_enums.h" 21 #include "content/common/frame_message_enums.h"
22 #include "content/common/frame_replication_state.h" 22 #include "content/common/frame_replication_state.h"
23 #include "content/common/mojo/service_registry_impl.h" 23 #include "content/common/mojo/service_registry_impl.h"
24 #include "content/public/browser/render_frame_host.h" 24 #include "content/public/browser/render_frame_host.h"
25 #include "content/public/common/javascript_message_type.h" 25 #include "content/public/common/javascript_message_type.h"
26 #include "net/http/http_response_headers.h" 26 #include "net/http/http_response_headers.h"
27 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
27 #include "third_party/WebKit/public/web/WebTextDirection.h" 28 #include "third_party/WebKit/public/web/WebTextDirection.h"
28 #include "ui/accessibility/ax_node_data.h" 29 #include "ui/accessibility/ax_node_data.h"
29 #include "ui/base/page_transition_types.h" 30 #include "ui/base/page_transition_types.h"
30 31
31 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
32 #include "content/browser/mojo/service_registry_android.h" 33 #include "content/browser/mojo/service_registry_android.h"
33 #endif 34 #endif
34 35
35 class GURL; 36 class GURL;
36 struct AccessibilityHostMsg_EventParams; 37 struct AccessibilityHostMsg_EventParams;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 404
404 // Tears down the browser-side state relating to the Mojo connection between 405 // Tears down the browser-side state relating to the Mojo connection between
405 // this instance and its associated render frame. 406 // this instance and its associated render frame.
406 void InvalidateMojoConnection(); 407 void InvalidateMojoConnection();
407 408
408 // Returns whether the frame is focused. A frame is considered focused when it 409 // 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. In 410 // is the parent chain of the focused frame within the frame tree. In
410 // addition, its associated RenderWidgetHostView has to be focused. 411 // addition, its associated RenderWidgetHostView has to be focused.
411 bool IsFocused(); 412 bool IsFocused();
412 413
414 // Returns the visibility state of the frame. The different visibility states
415 // of a frame are define in Blink.
jochen (gone - plz use gerrit) 2015/01/26 16:18:51 define*d*
mlamouri (slow - plz ping) 2015/01/26 17:40:43 Done.
416 blink::WebPageVisibilityState GetVisibilityState();
417
413 protected: 418 protected:
414 friend class RenderFrameHostFactory; 419 friend class RenderFrameHostFactory;
415 420
416 // |flags| is a combination of CreateRenderFrameFlags. 421 // |flags| is a combination of CreateRenderFrameFlags.
417 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 422 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
418 // should be the abstraction needed here, but we need RenderViewHost to pass 423 // should be the abstraction needed here, but we need RenderViewHost to pass
419 // into WebContentsObserver::FrameDetached for now. 424 // into WebContentsObserver::FrameDetached for now.
420 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 425 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
421 RenderFrameHostDelegate* delegate, 426 RenderFrameHostDelegate* delegate,
422 RenderWidgetHostDelegate* rwh_delegate, 427 RenderWidgetHostDelegate* rwh_delegate,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 659
655 // NOTE: This must be the last member. 660 // NOTE: This must be the last member.
656 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 661 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
657 662
658 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 663 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
659 }; 664 };
660 665
661 } // namespace content 666 } // namespace content
662 667
663 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 668 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698