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

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

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync, merge, address style nits. Created 7 years, 7 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 30 matching lines...) Expand all
41 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 41 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
49 #include "third_party/skia/include/core/SkShader.h" 49 #include "third_party/skia/include/core/SkShader.h"
50 #include "ui/base/ui_base_switches.h" 50 #include "ui/base/ui_base_switches.h"
51 #include "ui/gfx/point.h"
51 #include "ui/gfx/rect_conversions.h" 52 #include "ui/gfx/rect_conversions.h"
52 #include "ui/gfx/size_conversions.h" 53 #include "ui/gfx/size_conversions.h"
53 #include "ui/gfx/skia_util.h" 54 #include "ui/gfx/skia_util.h"
54 #include "ui/gl/gl_switches.h" 55 #include "ui/gl/gl_switches.h"
55 #include "ui/surface/transport_dib.h" 56 #include "ui/surface/transport_dib.h"
56 #include "webkit/glue/webkit_glue.h" 57 #include "webkit/glue/webkit_glue.h"
57 #include "webkit/plugins/npapi/webplugin.h" 58 #include "webkit/plugins/npapi/webplugin.h"
58 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 59 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
59 #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h" 60 #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h"
60 61
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 return; 1607 return;
1607 1608
1608 did_show_ = true; 1609 did_show_ = true;
1609 // NOTE: initial_pos_ may still have its default values at this point, but 1610 // NOTE: initial_pos_ may still have its default values at this point, but
1610 // that's okay. It'll be ignored if as_popup is false, or the browser 1611 // that's okay. It'll be ignored if as_popup is false, or the browser
1611 // process will impose a default position otherwise. 1612 // process will impose a default position otherwise.
1612 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); 1613 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_));
1613 SetPendingWindowRect(initial_pos_); 1614 SetPendingWindowRect(initial_pos_);
1614 } 1615 }
1615 1616
1617 void RenderWidget::didProgrammaticallyScroll(
1618 const WebKit::WebPoint& scroll_point) {
1619 if (!compositor_)
1620 return;
1621 Send(new ViewHostMsg_DidProgrammaticallyScroll(
1622 routing_id_, gfx::Vector2d(scroll_point.x, scroll_point.y)));
1623 }
1624
1616 void RenderWidget::didFocus() { 1625 void RenderWidget::didFocus() {
1617 } 1626 }
1618 1627
1619 void RenderWidget::didBlur() { 1628 void RenderWidget::didBlur() {
1620 } 1629 }
1621 1630
1622 void RenderWidget::DoDeferredClose() { 1631 void RenderWidget::DoDeferredClose() {
1623 Send(new ViewHostMsg_Close(routing_id_)); 1632 Send(new ViewHostMsg_Close(routing_id_));
1624 } 1633 }
1625 1634
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 2371
2363 if (!context->Initialize( 2372 if (!context->Initialize(
2364 attributes, 2373 attributes,
2365 false /* bind generates resources */, 2374 false /* bind generates resources */,
2366 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2375 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2367 return NULL; 2376 return NULL;
2368 return context.release(); 2377 return context.release();
2369 } 2378 }
2370 2379
2371 } // namespace content 2380 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698