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

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 and merge. 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
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 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 return; 1603 return;
1603 1604
1604 did_show_ = true; 1605 did_show_ = true;
1605 // NOTE: initial_pos_ may still have its default values at this point, but 1606 // NOTE: initial_pos_ may still have its default values at this point, but
1606 // that's okay. It'll be ignored if as_popup is false, or the browser 1607 // that's okay. It'll be ignored if as_popup is false, or the browser
1607 // process will impose a default position otherwise. 1608 // process will impose a default position otherwise.
1608 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); 1609 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_));
1609 SetPendingWindowRect(initial_pos_); 1610 SetPendingWindowRect(initial_pos_);
1610 } 1611 }
1611 1612
1613 void RenderWidget::didProgrammaticallyScroll(
1614 const WebKit::WebPoint& scrollPoint) {
brettw 2013/05/20 23:19:38 Use google-style for arg names
Michael van Ouwerkerk 2013/05/21 10:02:14 Done.
1615 if (!compositor_)
1616 return;
1617 Send(new ViewHostMsg_DidProgrammaticallyScroll(
1618 routing_id_, gfx::Vector2d(scrollPoint.x, scrollPoint.y)));
1619 }
1620
1612 void RenderWidget::didFocus() { 1621 void RenderWidget::didFocus() {
1613 } 1622 }
1614 1623
1615 void RenderWidget::didBlur() { 1624 void RenderWidget::didBlur() {
1616 } 1625 }
1617 1626
1618 void RenderWidget::DoDeferredClose() { 1627 void RenderWidget::DoDeferredClose() {
1619 Send(new ViewHostMsg_Close(routing_id_)); 1628 Send(new ViewHostMsg_Close(routing_id_));
1620 } 1629 }
1621 1630
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 2358
2350 if (!context->Initialize( 2359 if (!context->Initialize(
2351 attributes, 2360 attributes,
2352 false /* bind generates resources */, 2361 false /* bind generates resources */,
2353 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2362 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2354 return NULL; 2363 return NULL;
2355 return context.release(); 2364 return context.release();
2356 } 2365 }
2357 2366
2358 } // namespace content 2367 } // namespace content
OLDNEW
« content/public/common/top_controls_state.h ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698