OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 virtual void didDestroyScriptContext(WebKit::WebFrame* frame); | 537 virtual void didDestroyScriptContext(WebKit::WebFrame* frame); |
538 virtual void didCreateIsolatedScriptContext(WebKit::WebFrame* frame); | 538 virtual void didCreateIsolatedScriptContext(WebKit::WebFrame* frame); |
539 virtual void logCrossFramePropertyAccess( | 539 virtual void logCrossFramePropertyAccess( |
540 WebKit::WebFrame* frame, | 540 WebKit::WebFrame* frame, |
541 WebKit::WebFrame* target, | 541 WebKit::WebFrame* target, |
542 bool cross_origin, | 542 bool cross_origin, |
543 const WebKit::WebString& property_name, | 543 const WebKit::WebString& property_name, |
544 unsigned long long event_id); | 544 unsigned long long event_id); |
545 virtual void didChangeContentsSize(WebKit::WebFrame* frame, | 545 virtual void didChangeContentsSize(WebKit::WebFrame* frame, |
546 const WebKit::WebSize& size); | 546 const WebKit::WebSize& size); |
| 547 virtual void mayHaveChangedRenderedSize(WebKit::WebFrame* frame); |
547 virtual void didChangeScrollOffset(WebKit::WebFrame* frame); | 548 virtual void didChangeScrollOffset(WebKit::WebFrame* frame); |
548 virtual void reportFindInPageMatchCount(int request_id, | 549 virtual void reportFindInPageMatchCount(int request_id, |
549 int count, | 550 int count, |
550 bool final_update); | 551 bool final_update); |
551 virtual void reportFindInPageSelection(int request_id, | 552 virtual void reportFindInPageSelection(int request_id, |
552 int active_match_ordinal, | 553 int active_match_ordinal, |
553 const WebKit::WebRect& sel); | 554 const WebKit::WebRect& sel); |
554 | 555 |
555 virtual void openFileSystem(WebKit::WebFrame* frame, | 556 virtual void openFileSystem(WebKit::WebFrame* frame, |
556 WebKit::WebFileSystem::Type type, | 557 WebKit::WebFileSystem::Type type, |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 | 1024 |
1024 // Cache the preferred size of the page in order to prevent sending the IPC | 1025 // Cache the preferred size of the page in order to prevent sending the IPC |
1025 // when layout() recomputes but doesn't actually change sizes. | 1026 // when layout() recomputes but doesn't actually change sizes. |
1026 gfx::Size preferred_size_; | 1027 gfx::Size preferred_size_; |
1027 | 1028 |
1028 // Nasty hack. WebKit does not send us events when the preferred size changes, | 1029 // Nasty hack. WebKit does not send us events when the preferred size changes, |
1029 // so we must poll it. See also: | 1030 // so we must poll it. See also: |
1030 // https://bugs.webkit.org/show_bug.cgi?id=32807. | 1031 // https://bugs.webkit.org/show_bug.cgi?id=32807. |
1031 base::RepeatingTimer<RenderView> preferred_size_change_timer_; | 1032 base::RepeatingTimer<RenderView> preferred_size_change_timer_; |
1032 | 1033 |
| 1034 // Used to delay determining the preferred size (to avoid intermediate |
| 1035 // states for the sizes). |
| 1036 base::OneShotTimer<RenderView> check_preferred_size_timer_; |
| 1037 |
1033 #if defined(OS_MACOSX) | 1038 #if defined(OS_MACOSX) |
1034 // Track the fake plugin window handles allocated on the browser side for | 1039 // Track the fake plugin window handles allocated on the browser side for |
1035 // the accelerated compositor and (currently) accelerated plugins so that | 1040 // the accelerated compositor and (currently) accelerated plugins so that |
1036 // we can discard them when the view goes away. | 1041 // we can discard them when the view goes away. |
1037 std::set<gfx::PluginWindowHandle> fake_plugin_window_handles_; | 1042 std::set<gfx::PluginWindowHandle> fake_plugin_window_handles_; |
1038 #endif | 1043 #endif |
1039 | 1044 |
1040 // Plugins ------------------------------------------------------------------- | 1045 // Plugins ------------------------------------------------------------------- |
1041 | 1046 |
1042 // Remember the first uninstalled plugin, so that we can ask the plugin | 1047 // Remember the first uninstalled plugin, so that we can ask the plugin |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 // bunch of stuff, you should probably create a helper class and put your | 1154 // bunch of stuff, you should probably create a helper class and put your |
1150 // data and methods on that to avoid bloating RenderView more. You can use | 1155 // data and methods on that to avoid bloating RenderView more. You can use |
1151 // the Observer interface to filter IPC messages and receive frame change | 1156 // the Observer interface to filter IPC messages and receive frame change |
1152 // notifications. | 1157 // notifications. |
1153 // --------------------------------------------------------------------------- | 1158 // --------------------------------------------------------------------------- |
1154 | 1159 |
1155 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1160 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1156 }; | 1161 }; |
1157 | 1162 |
1158 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ | 1163 #endif // CONTENT_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |