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

Side by Side Diff: media/base/state_matrix.h

Issue 7572040: Enable media.dll / libmedia.so. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « media/base/seekable_buffer.h ('k') | media/base/video_decoder_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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 MEDIA_BASE_STATE_MATRIX_H_ 5 #ifndef MEDIA_BASE_STATE_MATRIX_H_
6 #define MEDIA_BASE_STATE_MATRIX_H_ 6 #define MEDIA_BASE_STATE_MATRIX_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "media/base/media_export.h"
11 12
12 namespace media { 13 namespace media {
13 14
14 class StateMatrix { 15 class MEDIA_EXPORT StateMatrix {
15 public: 16 public:
16 StateMatrix(); 17 StateMatrix();
17 ~StateMatrix(); 18 ~StateMatrix();
18 19
19 template <typename HandlerType> 20 template <typename HandlerType>
20 void AddState(int state, int (HandlerType::* handler)()) { 21 void AddState(int state, int (HandlerType::* handler)()) {
21 CHECK(!IsStateDefined(state)); 22 CHECK(!IsStateDefined(state));
22 StateEntryBase* entry = new StateEntry<HandlerType>(handler); 23 StateEntryBase* entry = new StateEntry<HandlerType>(handler);
23 states_.insert(std::make_pair(state, entry)); 24 states_.insert(std::make_pair(state, entry));
24 } 25 }
(...skipping 27 matching lines...) Expand all
52 53
53 typedef std::map<int, StateEntryBase*> StateMap; 54 typedef std::map<int, StateEntryBase*> StateMap;
54 StateMap states_; 55 StateMap states_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(StateMatrix); 57 DISALLOW_COPY_AND_ASSIGN(StateMatrix);
57 }; 58 };
58 59
59 } // namespace media 60 } // namespace media
60 61
61 #endif // MEDIA_BASE_STATE_MATRIX_H_ 62 #endif // MEDIA_BASE_STATE_MATRIX_H_
OLDNEW
« no previous file with comments | « media/base/seekable_buffer.h ('k') | media/base/video_decoder_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698