1bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen// Copyright (c) 2010 The Chromium Authors. All rights reserved. 2bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen// Use of this source code is governed by a BSD-style license that can be 3bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen// found in the LICENSE file. 4bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen 521d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#ifndef CHROME_BROWSER_UI_COCOA_APPLESCRIPT_ERROR_APPLESCRIPT_H_ 621d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#define CHROME_BROWSER_UI_COCOA_APPLESCRIPT_ERROR_APPLESCRIPT_H_ 7bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen 8bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen#import <Cocoa/Cocoa.h> 9bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen 10bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsennamespace AppleScript { 11bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen 12bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsenenum ErrorCode { 13bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when default profile cannot be obtained. 14bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errGetProfile = 1, 15bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when bookmark model fails to load. 16bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errBookmarkModelLoad, 17bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when bookmark folder cannot be created. 18bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errCreateBookmarkFolder, 19bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when bookmark item cannot be created. 20bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errCreateBookmarkItem, 21bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when URL entered is invalid. 22bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errInvalidURL, 23bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when printing cannot be initiated. 24bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errInitiatePrinting, 25bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when invalid tab save type is entered. 26bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errInvalidSaveType, 27bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when invalid browser mode is entered. 28bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errInvalidMode, 29bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when tab index is out of bounds. 30bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errInvalidTabIndex, 31bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when mode is set after browser window is created. 32bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errSetMode, 33bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen // Error when index of browser window is out of bounds. 34bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen errWrongIndex 35bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen}; 36bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen 37bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen// This function sets an error message to the currently executing command. 38bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsenvoid SetError(ErrorCode errorCode); 39bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen} 40bda42a81ee5f9b20d2bebedcf0bbef1e30e5b293Kristian Monsen 4121d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#endif // CHROME_BROWSER_UI_COCOA_APPLESCRIPT_ERROR_APPLESCRIPT_H_ 42