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

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

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just the vector Created 5 years, 1 month 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/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 last_scroll_offset_ = frame->metadata.root_scroll_offset; 1472 last_scroll_offset_ = frame->metadata.root_scroll_offset;
1473 1473
1474 page_at_minimum_scale_ = frame->metadata.page_scale_factor == 1474 page_at_minimum_scale_ = frame->metadata.page_scale_factor ==
1475 frame->metadata.min_page_scale_factor; 1475 frame->metadata.min_page_scale_factor;
1476 1476
1477 if (frame->delegated_frame_data) { 1477 if (frame->delegated_frame_data) {
1478 float scale_factor = frame->metadata.device_scale_factor; 1478 float scale_factor = frame->metadata.device_scale_factor;
1479 1479
1480 // Compute the frame size based on the root render pass rect size. 1480 // Compute the frame size based on the root render pass rect size.
1481 cc::RenderPass* root_pass = 1481 cc::RenderPass* root_pass =
1482 frame->delegated_frame_data->render_pass_list.back(); 1482 frame->delegated_frame_data->render_pass_list.back().get();
1483 gfx::Size pixel_size = root_pass->output_rect.size(); 1483 gfx::Size pixel_size = root_pass->output_rect.size();
1484 gfx::Size dip_size = gfx::ConvertSizeToDIP(scale_factor, pixel_size); 1484 gfx::Size dip_size = gfx::ConvertSizeToDIP(scale_factor, pixel_size);
1485 1485
1486 root_layer_->SetBounds(gfx::Rect(dip_size)); 1486 root_layer_->SetBounds(gfx::Rect(dip_size));
1487 if (!render_widget_host_->is_hidden()) { 1487 if (!render_widget_host_->is_hidden()) {
1488 EnsureBrowserCompositorView(); 1488 EnsureBrowserCompositorView();
1489 browser_compositor_->compositor()->SetScaleAndSize( 1489 browser_compositor_->compositor()->SetScaleAndSize(
1490 scale_factor, pixel_size); 1490 scale_factor, pixel_size);
1491 } 1491 }
1492 1492
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
3443 3443
3444 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3444 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3445 // regions that are not draggable. (See ControlRegionView in 3445 // regions that are not draggable. (See ControlRegionView in
3446 // native_app_window_cocoa.mm). This requires the render host view to be 3446 // native_app_window_cocoa.mm). This requires the render host view to be
3447 // draggable by default. 3447 // draggable by default.
3448 - (BOOL)mouseDownCanMoveWindow { 3448 - (BOOL)mouseDownCanMoveWindow {
3449 return YES; 3449 return YES;
3450 } 3450 }
3451 3451
3452 @end 3452 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698