• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef CHROME_BROWSER_UI_COCOA_APPLESCRIPT_ERROR_APPLESCRIPT_H_
6 #define CHROME_BROWSER_UI_COCOA_APPLESCRIPT_ERROR_APPLESCRIPT_H_
7 
8 #import <Cocoa/Cocoa.h>
9 
10 namespace AppleScript {
11 
12 enum ErrorCode {
13   // Error when default profile cannot be obtained.
14   errGetProfile = 1,
15   // Error when bookmark model fails to load.
16   errBookmarkModelLoad,
17   // Error when bookmark folder cannot be created.
18   errCreateBookmarkFolder,
19   // Error when bookmark item cannot be created.
20   errCreateBookmarkItem,
21   // Error when URL entered is invalid.
22   errInvalidURL,
23   // Error when printing cannot be initiated.
24   errInitiatePrinting,
25   // Error when invalid tab save type is entered.
26   errInvalidSaveType,
27   // Error when invalid browser mode is entered.
28   errInvalidMode,
29   // Error when tab index is out of bounds.
30   errInvalidTabIndex,
31   // Error when mode is set after browser window is created.
32   errSetMode,
33   // Error when index of browser window is out of bounds.
34   errWrongIndex
35 };
36 
37 // This function sets an error message to the currently executing command.
38 void SetError(ErrorCode errorCode);
39 }
40 
41 #endif  // CHROME_BROWSER_UI_COCOA_APPLESCRIPT_ERROR_APPLESCRIPT_H_
42