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

Side by Side Diff: content/renderer/render_widget.cc

Issue 325933003: Scroll offset pinning and content size notifications were only used for the Mac overlay navigation … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 screen_info_(screen_info), 389 screen_info_(screen_info),
390 device_scale_factor_(screen_info_.deviceScaleFactor), 390 device_scale_factor_(screen_info_.deviceScaleFactor),
391 is_threaded_compositing_enabled_(false), 391 is_threaded_compositing_enabled_(false),
392 current_event_latency_info_(NULL), 392 current_event_latency_info_(NULL),
393 next_output_surface_id_(0), 393 next_output_surface_id_(0),
394 #if defined(OS_ANDROID) 394 #if defined(OS_ANDROID)
395 text_field_is_dirty_(false), 395 text_field_is_dirty_(false),
396 outstanding_ime_acks_(0), 396 outstanding_ime_acks_(0),
397 body_background_color_(SK_ColorWHITE), 397 body_background_color_(SK_ColorWHITE),
398 #endif 398 #endif
399 #if defined(OS_MACOSX)
400 cached_has_main_frame_horizontal_scrollbar_(false),
401 cached_has_main_frame_vertical_scrollbar_(false),
402 #endif
403 popup_origin_scale_for_emulation_(0.f), 399 popup_origin_scale_for_emulation_(0.f),
404 resizing_mode_selector_(new ResizingModeSelector()), 400 resizing_mode_selector_(new ResizingModeSelector()),
405 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) { 401 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) {
406 if (!swapped_out) 402 if (!swapped_out)
407 RenderProcess::current()->AddRefProcess(); 403 RenderProcess::current()->AddRefProcess();
408 DCHECK(RenderThread::Get()); 404 DCHECK(RenderThread::Get());
409 is_threaded_compositing_enabled_ = 405 is_threaded_compositing_enabled_ =
410 CommandLine::ForCurrentProcess()->HasSwitch( 406 CommandLine::ForCurrentProcess()->HasSwitch(
411 switches::kEnableThreadedCompositing); 407 switches::kEnableThreadedCompositing);
412 } 408 }
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 body_background_color_ = bg_color; 1891 body_background_color_ = bg_color;
1896 Send(new ViewHostMsg_DidChangeBodyBackgroundColor(routing_id(), bg_color)); 1892 Send(new ViewHostMsg_DidChangeBodyBackgroundColor(routing_id(), bg_color));
1897 } 1893 }
1898 } 1894 }
1899 #endif 1895 #endif
1900 1896
1901 bool RenderWidget::CanComposeInline() { 1897 bool RenderWidget::CanComposeInline() {
1902 return true; 1898 return true;
1903 } 1899 }
1904 1900
1905 #if defined(OS_MACOSX)
1906 void RenderWidget::DidChangeScrollbarsForMainFrame(
1907 bool has_horizontal_scrollbar,
1908 bool has_vertical_scrollbar) {
1909 if (has_horizontal_scrollbar != cached_has_main_frame_horizontal_scrollbar_ ||
1910 has_vertical_scrollbar != cached_has_main_frame_vertical_scrollbar_) {
1911 Send(new ViewHostMsg_DidChangeScrollbarsForMainFrame(
1912 routing_id_, has_horizontal_scrollbar, has_vertical_scrollbar));
1913
1914 cached_has_main_frame_horizontal_scrollbar_ = has_horizontal_scrollbar;
1915 cached_has_main_frame_vertical_scrollbar_ = has_vertical_scrollbar;
1916 }
1917 }
1918 #endif // defined(OS_MACOSX)
1919
1920 WebScreenInfo RenderWidget::screenInfo() { 1901 WebScreenInfo RenderWidget::screenInfo() {
1921 return screen_info_; 1902 return screen_info_;
1922 } 1903 }
1923 1904
1924 float RenderWidget::deviceScaleFactor() { 1905 float RenderWidget::deviceScaleFactor() {
1925 return device_scale_factor_; 1906 return device_scale_factor_;
1926 } 1907 }
1927 1908
1928 void RenderWidget::resetInputMethod() { 1909 void RenderWidget::resetInputMethod() {
1929 if (!input_method_is_active_) 1910 if (!input_method_is_active_)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2120 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2140 video_hole_frames_.AddObserver(frame); 2121 video_hole_frames_.AddObserver(frame);
2141 } 2122 }
2142 2123
2143 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2124 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2144 video_hole_frames_.RemoveObserver(frame); 2125 video_hole_frames_.RemoveObserver(frame);
2145 } 2126 }
2146 #endif // defined(VIDEO_HOLE) 2127 #endif // defined(VIDEO_HOLE)
2147 2128
2148 } // namespace content 2129 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698