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

Side by Side Diff: ui/web_dialogs/web_dialog_web_contents_delegate.cc

Issue 889403004: Rename initial_pos to initial_rect in ShowWidget and ShowView IPCs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « ui/web_dialogs/web_dialog_web_contents_delegate.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 "ui/web_dialogs/web_dialog_web_contents_delegate.h" 5 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "third_party/WebKit/public/web/WebInputEvent.h" 9 #include "third_party/WebKit/public/web/WebInputEvent.h"
10 10
(...skipping 24 matching lines...) Expand all
35 browser_context_ = NULL; 35 browser_context_ = NULL;
36 } 36 }
37 37
38 WebContents* WebDialogWebContentsDelegate::OpenURLFromTab( 38 WebContents* WebDialogWebContentsDelegate::OpenURLFromTab(
39 WebContents* source, const OpenURLParams& params) { 39 WebContents* source, const OpenURLParams& params) {
40 return handler_->OpenURLFromTab(browser_context_, source, params); 40 return handler_->OpenURLFromTab(browser_context_, source, params);
41 } 41 }
42 42
43 void WebDialogWebContentsDelegate::AddNewContents( 43 void WebDialogWebContentsDelegate::AddNewContents(
44 WebContents* source, WebContents* new_contents, 44 WebContents* source, WebContents* new_contents,
45 WindowOpenDisposition disposition, const gfx::Rect& initial_pos, 45 WindowOpenDisposition disposition, const gfx::Rect& initial_rect,
46 bool user_gesture, 46 bool user_gesture,
47 bool* was_blocked) { 47 bool* was_blocked) {
48 handler_->AddNewContents(browser_context_, source, new_contents, disposition, 48 handler_->AddNewContents(browser_context_, source, new_contents, disposition,
49 initial_pos, user_gesture); 49 initial_rect, user_gesture);
50 } 50 }
51 51
52 bool WebDialogWebContentsDelegate::IsPopupOrPanel( 52 bool WebDialogWebContentsDelegate::IsPopupOrPanel(
53 const WebContents* source) const { 53 const WebContents* source) const {
54 // This needs to return true so that we are allowed to be resized by our 54 // This needs to return true so that we are allowed to be resized by our
55 // contents. 55 // contents.
56 return true; 56 return true;
57 } 57 }
58 58
59 bool WebDialogWebContentsDelegate::PreHandleGestureEvent( 59 bool WebDialogWebContentsDelegate::PreHandleGestureEvent(
60 WebContents* source, 60 WebContents* source,
61 const blink::WebGestureEvent& event) { 61 const blink::WebGestureEvent& event) {
62 // Disable pinch zooming. 62 // Disable pinch zooming.
63 return event.type == blink::WebGestureEvent::GesturePinchBegin || 63 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
64 event.type == blink::WebGestureEvent::GesturePinchUpdate || 64 event.type == blink::WebGestureEvent::GesturePinchUpdate ||
65 event.type == blink::WebGestureEvent::GesturePinchEnd; 65 event.type == blink::WebGestureEvent::GesturePinchEnd;
66 } 66 }
67 67
68 } // namespace ui 68 } // namespace ui
OLDNEW
« no previous file with comments | « ui/web_dialogs/web_dialog_web_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698