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

Side by Side Diff: chrome/browser/ui/cocoa/confirm_bubble_controller.mm

Issue 468193005: Remove SetAllowOverlappingView from RWHVMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_ca_flag
Patch Set: Created 6 years, 4 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/confirm_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
10 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" 10 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h"
11 #import "chrome/browser/ui/confirm_bubble_model.h" 11 #import "chrome/browser/ui/confirm_bubble_model.h"
12 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 #include "ui/gfx/point.h" 13 #include "ui/gfx/point.h"
14 14
15 @implementation ConfirmBubbleController 15 @implementation ConfirmBubbleController
16 16
17 - (id)initWithParent:(NSView*)parent 17 - (id)initWithParent:(NSView*)parent
18 origin:(CGPoint)origin 18 origin:(CGPoint)origin
19 model:(ConfirmBubbleModel*)model { 19 model:(ConfirmBubbleModel*)model {
20 if ((self = [super initWithNibName:nil bundle:nil])) { 20 if ((self = [super initWithNibName:nil bundle:nil])) {
21 parent_ = parent; 21 parent_ = parent;
22 origin_ = origin; 22 origin_ = origin;
23 model_.reset(model); 23 model_.reset(model);
24 } 24 }
25 return self; 25 return self;
26 } 26 }
27 27
28 - (void)loadView { 28 - (void)loadView {
29 [[BrowserWindowController
30 browserWindowControllerForView:parent_] onOverlappedViewShown];
31 [self setView:[[[ConfirmBubbleCocoa alloc] initWithParent:parent_ 29 [self setView:[[[ConfirmBubbleCocoa alloc] initWithParent:parent_
32 controller:self] autorelease]]; 30 controller:self] autorelease]];
33 } 31 }
34 32
35 - (void)windowWillClose:(NSNotification*)notification { 33 - (void)windowWillClose:(NSNotification*)notification {
36 [[BrowserWindowController
37 browserWindowControllerForView:parent_] onOverlappedViewHidden];
38 [self autorelease]; 34 [self autorelease];
39 } 35 }
40 36
41 // Accessors. This functions converts the C++ types retrieved from the 37 // Accessors. This functions converts the C++ types retrieved from the
42 // ConfirmBubbleModel object to Objective-C types, and return them. 38 // ConfirmBubbleModel object to Objective-C types, and return them.
43 - (NSPoint)origin { 39 - (NSPoint)origin {
44 return NSPointFromCGPoint(origin_); 40 return NSPointFromCGPoint(origin_);
45 } 41 }
46 42
47 - (NSString*)title { 43 - (NSString*)title {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 82
87 - (void)cancel { 83 - (void)cancel {
88 model_->Cancel(); 84 model_->Cancel();
89 } 85 }
90 86
91 - (void)linkClicked { 87 - (void)linkClicked {
92 model_->LinkClicked(); 88 model_->LinkClicked();
93 } 89 }
94 90
95 @end 91 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698