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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc

Issue 2173033002: Make various views SetShape() methods take an unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 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
« no previous file with comments | « no previous file | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "apps/ui/views/app_window_frame_view.h" 10 #include "apps/ui/views/app_window_frame_view.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE); 348 widget()->SetFullscreen(fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE);
349 } 349 }
350 350
351 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const { 351 bool ChromeNativeAppWindowViews::IsFullscreenOrPending() const {
352 return widget()->IsFullscreen(); 352 return widget()->IsFullscreen();
353 } 353 }
354 354
355 void ChromeNativeAppWindowViews::UpdateShape(std::unique_ptr<SkRegion> region) { 355 void ChromeNativeAppWindowViews::UpdateShape(std::unique_ptr<SkRegion> region) {
356 shape_ = std::move(region); 356 shape_ = std::move(region);
357 widget()->SetShape(shape() ? new SkRegion(*shape()) : nullptr); 357 widget()->SetShape(shape() ? base::MakeUnique<SkRegion>(*shape()) : nullptr);
358 widget()->OnSizeConstraintsChanged(); 358 widget()->OnSizeConstraintsChanged();
359 } 359 }
360 360
361 bool ChromeNativeAppWindowViews::HasFrameColor() const { 361 bool ChromeNativeAppWindowViews::HasFrameColor() const {
362 return has_frame_color_; 362 return has_frame_color_;
363 } 363 }
364 364
365 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { 365 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const {
366 return active_frame_color_; 366 return active_frame_color_;
367 } 367 }
(...skipping 16 matching lines...) Expand all
384 InitializePanelWindow(create_params); 384 InitializePanelWindow(create_params);
385 } else { 385 } else {
386 InitializeDefaultWindow(create_params); 386 InitializeDefaultWindow(create_params);
387 } 387 }
388 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 388 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
389 Profile::FromBrowserContext(app_window->browser_context()), 389 Profile::FromBrowserContext(app_window->browser_context()),
390 widget()->GetFocusManager(), 390 widget()->GetFocusManager(),
391 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 391 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
392 NULL)); 392 NULL));
393 } 393 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698