| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 
| 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 
| 7 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" | 
| 10 | 10 | 
| 11 #include <set> | 11 #include <set> | 
| 12 #include <string> | 12 #include <string> | 
| 13 | 13 | 
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) | 
| 15 #include <objidl.h> | 15 #include <objidl.h> | 
| 16 #elif !defined(OS_MACOSX) | 16 #elif defined(TOOLKIT_USES_GTK) | 
| 17 #include <gtk/gtk.h> | 17 #include <gtk/gtk.h> | 
| 18 #endif | 18 #endif | 
| 19 | 19 | 
| 20 #include "base/basictypes.h" | 20 #include "base/basictypes.h" | 
| 21 #include "base/file_path.h" | 21 #include "base/file_path.h" | 
| 22 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" | 
| 23 #include "ui/base/dragdrop/download_file_interface.h" | 23 #include "ui/base/dragdrop/download_file_interface.h" | 
| 24 #include "ui/base/ui_export.h" | 24 #include "ui/base/ui_export.h" | 
| 25 | 25 | 
| 26 class GURL; | 26 class GURL; | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 41 // NOTE: Support for html and file contents is required by TabContentViewWin. | 41 // NOTE: Support for html and file contents is required by TabContentViewWin. | 
| 42 // TabContentsViewGtk uses a different class to handle drag support that does | 42 // TabContentsViewGtk uses a different class to handle drag support that does | 
| 43 // not use OSExchangeData. As such, file contents and html support is only | 43 // not use OSExchangeData. As such, file contents and html support is only | 
| 44 // compiled on windows. | 44 // compiled on windows. | 
| 45 class UI_EXPORT OSExchangeData { | 45 class UI_EXPORT OSExchangeData { | 
| 46  public: | 46  public: | 
| 47   // CustomFormats are used for non-standard data types. For example, bookmark | 47   // CustomFormats are used for non-standard data types. For example, bookmark | 
| 48   // nodes are written using a CustomFormat. | 48   // nodes are written using a CustomFormat. | 
| 49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) | 
| 50   typedef CLIPFORMAT CustomFormat; | 50   typedef CLIPFORMAT CustomFormat; | 
| 51 #elif !defined(OS_MACOSX) | 51 #elif defined(TOOLKIT_USES_GTK) | 
| 52   typedef GdkAtom CustomFormat; | 52   typedef GdkAtom CustomFormat; | 
|  | 53 #else | 
|  | 54   typedef void* CustomFormat; | 
| 53 #endif | 55 #endif | 
| 54 | 56 | 
| 55   // Enumeration of the known formats. | 57   // Enumeration of the known formats. | 
| 56   enum Format { | 58   enum Format { | 
| 57     STRING         = 1 << 0, | 59     STRING         = 1 << 0, | 
| 58     URL            = 1 << 1, | 60     URL            = 1 << 1, | 
| 59     FILE_NAME      = 1 << 2, | 61     FILE_NAME      = 1 << 2, | 
| 60     PICKLED_DATA   = 1 << 3, | 62     PICKLED_DATA   = 1 << 3, | 
| 61 #if defined(OS_WIN) | 63 #if defined(OS_WIN) | 
| 62     FILE_CONTENTS  = 1 << 4, | 64     FILE_CONTENTS  = 1 << 4, | 
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 190 | 192 | 
| 191   // Provides the actual data. | 193   // Provides the actual data. | 
| 192   scoped_ptr<Provider> provider_; | 194   scoped_ptr<Provider> provider_; | 
| 193 | 195 | 
| 194   DISALLOW_COPY_AND_ASSIGN(OSExchangeData); | 196   DISALLOW_COPY_AND_ASSIGN(OSExchangeData); | 
| 195 }; | 197 }; | 
| 196 | 198 | 
| 197 }  // namespace ui | 199 }  // namespace ui | 
| 198 | 200 | 
| 199 #endif  // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 201 #endif  // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_H_ | 
| OLD | NEW | 
|---|