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

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: 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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 last_scroll_offset_ = frame->metadata.root_scroll_offset; 1470 last_scroll_offset_ = frame->metadata.root_scroll_offset;
1471 1471
1472 page_at_minimum_scale_ = frame->metadata.page_scale_factor == 1472 page_at_minimum_scale_ = frame->metadata.page_scale_factor ==
1473 frame->metadata.min_page_scale_factor; 1473 frame->metadata.min_page_scale_factor;
1474 1474
1475 if (frame->delegated_frame_data) { 1475 if (frame->delegated_frame_data) {
1476 float scale_factor = frame->metadata.device_scale_factor; 1476 float scale_factor = frame->metadata.device_scale_factor;
1477 1477
1478 // Compute the frame size based on the root render pass rect size. 1478 // Compute the frame size based on the root render pass rect size.
1479 cc::RenderPass* root_pass = 1479 cc::RenderPass* root_pass =
1480 frame->delegated_frame_data->render_pass_list.back(); 1480 frame->delegated_frame_data->render_pass_list.back().get();
1481 gfx::Size pixel_size = root_pass->output_rect.size(); 1481 gfx::Size pixel_size = root_pass->output_rect.size();
1482 gfx::Size dip_size = gfx::ConvertSizeToDIP(scale_factor, pixel_size); 1482 gfx::Size dip_size = gfx::ConvertSizeToDIP(scale_factor, pixel_size);
1483 1483
1484 root_layer_->SetBounds(gfx::Rect(dip_size)); 1484 root_layer_->SetBounds(gfx::Rect(dip_size));
1485 if (!render_widget_host_->is_hidden()) { 1485 if (!render_widget_host_->is_hidden()) {
1486 EnsureBrowserCompositorView(); 1486 EnsureBrowserCompositorView();
1487 browser_compositor_->compositor()->SetScaleAndSize( 1487 browser_compositor_->compositor()->SetScaleAndSize(
1488 scale_factor, pixel_size); 1488 scale_factor, pixel_size);
1489 } 1489 }
1490 1490
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
3441 3441
3442 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3442 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3443 // regions that are not draggable. (See ControlRegionView in 3443 // regions that are not draggable. (See ControlRegionView in
3444 // native_app_window_cocoa.mm). This requires the render host view to be 3444 // native_app_window_cocoa.mm). This requires the render host view to be
3445 // draggable by default. 3445 // draggable by default.
3446 - (BOOL)mouseDownCanMoveWindow { 3446 - (BOOL)mouseDownCanMoveWindow {
3447 return YES; 3447 return YES;
3448 } 3448 }
3449 3449
3450 @end 3450 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | content/common/cc_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698