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 MEDIA_TOOLS_PLAYER_WTL_MAINFRM_H_ | 5 #ifndef MEDIA_TOOLS_PLAYER_WTL_MAINFRM_H_ |
6 #define MEDIA_TOOLS_PLAYER_WTL_MAINFRM_H_ | 6 #define MEDIA_TOOLS_PLAYER_WTL_MAINFRM_H_ |
7 | 7 |
8 #include "media/tools/player_wtl/list.h" | 8 #include "media/tools/player_wtl/list.h" |
9 #include "media/tools/player_wtl/props.h" | 9 #include "media/tools/player_wtl/props.h" |
10 #include "media/tools/player_wtl/seek.h" | 10 #include "media/tools/player_wtl/seek.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 virtual BOOL PreTranslateMessage(MSG* pMsg) { | 57 virtual BOOL PreTranslateMessage(MSG* pMsg) { |
58 if (CFrameWindowImpl<CMainFrame>::PreTranslateMessage(pMsg)) | 58 if (CFrameWindowImpl<CMainFrame>::PreTranslateMessage(pMsg)) |
59 return TRUE; | 59 return TRUE; |
60 | 60 |
61 return m_view.PreTranslateMessage(pMsg); | 61 return m_view.PreTranslateMessage(pMsg); |
62 } | 62 } |
63 | 63 |
64 virtual BOOL OnIdle() { | 64 virtual BOOL OnIdle() { |
65 BOOL bEnable = !m_view.bmp_.IsNull(); | 65 BOOL bEnable = !m_view.bmp_.IsNull(); |
66 BOOL bMovieOpen = media::Movie::GetInstance()->IsOpen() ? true : false; | 66 BOOL bMovieOpen = media::Movie::GetInstance()->IsOpen(); |
67 | 67 |
68 float current_position = media::Movie::GetInstance()->GetPosition(); | 68 float current_position = media::Movie::GetInstance()->GetPosition(); |
69 float duration = media::Movie::GetInstance()->GetDuration(); | 69 float duration = media::Movie::GetInstance()->GetDuration(); |
70 if (enable_exit && bEnable && | 70 if (enable_exit && bEnable && |
71 duration > 0.0f && current_position >= duration) { | 71 duration > 0.0f && current_position >= duration) { |
72 OnFileExit(0, 0, 0); | 72 OnFileExit(0, 0, 0); |
73 } | 73 } |
74 | 74 |
75 UIEnable(ID_FILE_PRINT, bEnable); | 75 UIEnable(ID_FILE_PRINT, bEnable); |
76 UIEnable(ID_FILE_PRINT_PREVIEW, bEnable); | 76 UIEnable(ID_FILE_PRINT_PREVIEW, bEnable); |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 } | 728 } |
729 | 729 |
730 | 730 |
731 void OnPlayGotoFrame(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wnd*/) { | 731 void OnPlayGotoFrame(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wnd*/) { |
732 CSeek seek; | 732 CSeek seek; |
733 seek.DoModal(); | 733 seek.DoModal(); |
734 } | 734 } |
735 }; | 735 }; |
736 | 736 |
737 #endif // MEDIA_TOOLS_PLAYER_WTL_MAINFRM_H_ | 737 #endif // MEDIA_TOOLS_PLAYER_WTL_MAINFRM_H_ |
OLD | NEW |