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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

Issue 1579863003: Convert Pass()→std::move() for Mac build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (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 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility>
8 9
9 #include "base/callback.h" 10 #include "base/callback.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "chrome/browser/devtools/devtools_window.h" 12 #include "chrome/browser/devtools/devtools_window.h"
12 #include "chrome/browser/extensions/extension_view_host.h" 13 #include "chrome/browser/extensions/extension_view_host.h"
13 #include "chrome/browser/extensions/extension_view_host_factory.h" 14 #include "chrome/browser/extensions/extension_view_host_factory.h"
14 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
15 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" 16 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
16 #import "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" 17 #import "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
17 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 18 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 [gPopup close]; // Starts the animation to fade out the popup. 270 [gPopup close]; // Starts the animation to fade out the popup.
270 271
271 // Create the popup first. This establishes an initially hidden NSWindow so 272 // Create the popup first. This establishes an initially hidden NSWindow so
272 // that the renderer is able to gather correct screen metrics for the initial 273 // that the renderer is able to gather correct screen metrics for the initial
273 // paint. 274 // paint.
274 gPopup = [[ExtensionPopupController alloc] 275 gPopup = [[ExtensionPopupController alloc]
275 initWithParentWindow:browser->window()->GetNativeWindow() 276 initWithParentWindow:browser->window()->GetNativeWindow()
276 anchoredAt:anchoredAt 277 anchoredAt:anchoredAt
277 arrowLocation:arrowLocation 278 arrowLocation:arrowLocation
278 devMode:devMode]; 279 devMode:devMode];
279 [gPopup setExtensionViewHost:host.Pass()]; 280 [gPopup setExtensionViewHost:std::move(host)];
280 return gPopup; 281 return gPopup;
281 } 282 }
282 283
283 + (ExtensionPopupController*)popup { 284 + (ExtensionPopupController*)popup {
284 return gPopup; 285 return gPopup;
285 } 286 }
286 287
287 - (void)setExtensionViewHost:(scoped_ptr<ExtensionViewHost>)host { 288 - (void)setExtensionViewHost:(scoped_ptr<ExtensionViewHost>)host {
288 DCHECK(!host_); 289 DCHECK(!host_);
289 DCHECK(host); 290 DCHECK(host);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 return minSize; 442 return minSize;
442 } 443 }
443 444
444 // Private (TestingAPI) 445 // Private (TestingAPI)
445 + (NSSize)maxPopupSize { 446 + (NSSize)maxPopupSize {
446 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; 447 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight};
447 return maxSize; 448 return maxSize;
448 } 449 }
449 450
450 @end 451 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698