[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / applescript / element_applescript.mm
blobad506059d9ed2d39cac501b5733d4bd40f2c64d3
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "chrome/browser/ui/cocoa/applescript/element_applescript.h"
7 @implementation ElementAppleScript
9 @synthesize uniqueID = uniqueID_;
10 @synthesize container = container_;
11 @synthesize containerProperty = containerProperty_;
13 // calling objectSpecifier asks an object to return an object specifier
14 // record referring to itself.  You must call setContainer:property: before
15 // you can call this method.
16 - (NSScriptObjectSpecifier*)objectSpecifier {
17   return [[[NSUniqueIDSpecifier allocWithZone:[self zone]]
18       initWithContainerClassDescription:
19           (NSScriptClassDescription*)[[self container] classDescription]
20                      containerSpecifier:[[self container] objectSpecifier]
21                                     key:[self containerProperty]
22                                uniqueID:[self uniqueID]] autorelease];
25 - (void)setContainer:(id)value property:(NSString*)property {
26   [self setContainer:value];
27   [self setContainerProperty:property];
30 - (void)dealloc {
31   [uniqueID_ release];
32   [container_ release];
33   [containerProperty_ release];
34   [super dealloc];
37 @end