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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
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/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 AckPendingSwapBuffers(); 1126 AckPendingSwapBuffers();
1127 } 1127 }
1128 1128
1129 void RenderWidgetHostViewMac::OnAcceleratedCompositingStateChange() { 1129 void RenderWidgetHostViewMac::OnAcceleratedCompositingStateChange() {
1130 } 1130 }
1131 1131
1132 void RenderWidgetHostViewMac::GetScreenInfo(WebKit::WebScreenInfo* results) { 1132 void RenderWidgetHostViewMac::GetScreenInfo(WebKit::WebScreenInfo* results) {
1133 *results = WebKit::WebScreenInfoFactory::screenInfo(GetNativeView()); 1133 *results = WebKit::WebScreenInfoFactory::screenInfo(GetNativeView());
1134 } 1134 }
1135 1135
1136 gfx::Rect RenderWidgetHostViewMac::GetRootWindowBounds() { 1136 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() {
1137 // TODO(shess): In case of !window, the view has been removed from 1137 // TODO(shess): In case of !window, the view has been removed from
1138 // the view hierarchy because the tab isn't main. Could retrieve 1138 // the view hierarchy because the tab isn't main. Could retrieve
1139 // the information from the main tab for our window. 1139 // the information from the main tab for our window.
1140 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_); 1140 NSWindow* enclosing_window = ApparentWindowForView(cocoa_view_);
1141 if (!enclosing_window) 1141 if (!enclosing_window)
1142 return gfx::Rect(); 1142 return gfx::Rect();
1143 1143
1144 NSRect bounds = [enclosing_window frame]; 1144 NSRect bounds = [enclosing_window frame];
1145 return FlipNSRectToRectScreen(bounds); 1145 return FlipNSRectToRectScreen(bounds);
1146 } 1146 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 void RenderWidgetHostViewMac::SetWindowVisibility(bool visible) { 1272 void RenderWidgetHostViewMac::SetWindowVisibility(bool visible) {
1273 if (render_widget_host_) { 1273 if (render_widget_host_) {
1274 render_widget_host_->Send(new ViewMsg_SetWindowVisibility( 1274 render_widget_host_->Send(new ViewMsg_SetWindowVisibility(
1275 render_widget_host_->GetRoutingID(), visible)); 1275 render_widget_host_->GetRoutingID(), visible));
1276 } 1276 }
1277 } 1277 }
1278 1278
1279 void RenderWidgetHostViewMac::WindowFrameChanged() { 1279 void RenderWidgetHostViewMac::WindowFrameChanged() {
1280 if (render_widget_host_) { 1280 if (render_widget_host_) {
1281 render_widget_host_->Send(new ViewMsg_WindowFrameChanged( 1281 render_widget_host_->Send(new ViewMsg_WindowFrameChanged(
1282 render_widget_host_->GetRoutingID(), GetRootWindowBounds(), 1282 render_widget_host_->GetRoutingID(), GetBoundsInRootWindow(),
1283 GetViewBounds())); 1283 GetViewBounds()));
1284 } 1284 }
1285 } 1285 }
1286 1286
1287 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) { 1287 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) {
1288 content::RenderWidgetHostViewBase::SetBackground(background); 1288 content::RenderWidgetHostViewBase::SetBackground(background);
1289 if (render_widget_host_) 1289 if (render_widget_host_)
1290 render_widget_host_->Send(new ViewMsg_SetBackground( 1290 render_widget_host_->Send(new ViewMsg_SetBackground(
1291 render_widget_host_->GetRoutingID(), background)); 1291 render_widget_host_->GetRoutingID(), background));
1292 } 1292 }
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 if (!string) return NO; 3091 if (!string) return NO;
3092 3092
3093 // If the user is currently using an IME, confirm the IME input, 3093 // If the user is currently using an IME, confirm the IME input,
3094 // and then insert the text from the service, the same as TextEdit and Safari. 3094 // and then insert the text from the service, the same as TextEdit and Safari.
3095 [self confirmComposition]; 3095 [self confirmComposition];
3096 [self insertText:string]; 3096 [self insertText:string];
3097 return YES; 3097 return YES;
3098 } 3098 }
3099 3099
3100 @end 3100 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/browser/renderer_host/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698