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

Side by Side Diff: media/tools/player_wtl/mainfrm.h

Issue 10939010: Cleanup: avoid foo ? true : false, part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 2 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
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « media/audio/cross_process_notification_unittest.cc ('k') | media/video/capture/win/video_capture_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698