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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 2695093005: Remove RWHV::SetBounds() from the public API, and make comments clearer.
Patch Set: Revert web_contents_sizer to its previous shenanigans (http://crbug.com/693953). Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/frame_host/render_widget_host_view_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if ((guest_ && guest_->is_in_destruction()) || host_->is_hidden()) 135 if ((guest_ && guest_->is_in_destruction()) || host_->is_hidden())
136 return; 136 return;
137 host_->WasHidden(); 137 host_->WasHidden();
138 } 138 }
139 139
140 void RenderWidgetHostViewGuest::SetSize(const gfx::Size& size) { 140 void RenderWidgetHostViewGuest::SetSize(const gfx::Size& size) {
141 size_ = size; 141 size_ = size;
142 host_->WasResized(); 142 host_->WasResized();
143 } 143 }
144 144
145 void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) { 145 void RenderWidgetHostViewGuest::RequestTopLevelBoundsInScreen(
146 const gfx::Rect& rect) {
146 SetSize(rect.size()); 147 SetSize(rect.size());
147 } 148 }
148 149
149 void RenderWidgetHostViewGuest::Focus() { 150 void RenderWidgetHostViewGuest::Focus() {
150 // InterstitialPageImpl focuses views directly, so we place focus logic here. 151 // InterstitialPageImpl focuses views directly, so we place focus logic here.
151 // InterstitialPages are not WebContents, and so BrowserPluginGuest does not 152 // InterstitialPages are not WebContents, and so BrowserPluginGuest does not
152 // have direct access to the interstitial page's RenderWidgetHost. 153 // have direct access to the interstitial page's RenderWidgetHost.
153 if (guest_) 154 if (guest_)
154 guest_->SetFocus(host_, true, blink::WebFocusTypeNone); 155 guest_->SetFocus(host_, true, blink::WebFocusTypeNone);
155 } 156 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 gesture_event.data.scrollUpdate.inertialPhase == 640 gesture_event.data.scrollUpdate.inertialPhase ==
640 blink::WebGestureEvent::MomentumPhase) { 641 blink::WebGestureEvent::MomentumPhase) {
641 return; 642 return;
642 } 643 }
643 host_->ForwardGestureEvent(gesture_event); 644 host_->ForwardGestureEvent(gesture_event);
644 return; 645 return;
645 } 646 }
646 } 647 }
647 648
648 } // namespace content 649 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698