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

Side by Side Diff: chrome/browser/chromeos/media/media_player_extension_api.cc

Issue 11269043: Make the title of Chrome OS Audio Player empty (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a test Created 8 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/values.h" 5 #include "base/values.h"
6 #include "chrome/browser/chromeos/media/media_player.h" 6 #include "chrome/browser/chromeos/media/media_player.h"
7 #include "chrome/browser/chromeos/media/media_player_extension_api.h" 7 #include "chrome/browser/chromeos/media/media_player_extension_api.h"
8 8
9 static const char kPropertyItems[] = "items"; 9 static const char kPropertyItems[] = "items";
10 static const char kPropertyPosition[] = "position"; 10 static const char kPropertyPosition[] = "position";
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DictionaryValue* result = new DictionaryValue(); 55 DictionaryValue* result = new DictionaryValue();
56 MediaPlayer* player = MediaPlayer::GetInstance(); 56 MediaPlayer* player = MediaPlayer::GetInstance();
57 57
58 result->Set(kPropertyItems, GetPlaylistItems()); 58 result->Set(kPropertyItems, GetPlaylistItems());
59 result->SetInteger(kPropertyPosition, player->GetPlaylistPosition()); 59 result->SetInteger(kPropertyPosition, player->GetPlaylistPosition());
60 60
61 SetResult(result); 61 SetResult(result);
62 return true; 62 return true;
63 } 63 }
64 64
65 // TODO(kaznacheev): rename the API method to adjustWindowHeight here and in
66 // media_player_private.json.
65 bool SetWindowHeightMediaplayerFunction::RunImpl() { 67 bool SetWindowHeightMediaplayerFunction::RunImpl() {
66 int height; 68 int height_diff;
67 if (!args_->GetInteger(0, &height)) 69 if (!args_->GetInteger(0, &height_diff))
68 return false; 70 return false;
69 MediaPlayer::GetInstance()->SetWindowHeight(height); 71 MediaPlayer::GetInstance()->AdjustWindowHeight(height_diff);
70 return true; 72 return true;
71 } 73 }
72 74
73 bool CloseWindowMediaplayerFunction::RunImpl() { 75 bool CloseWindowMediaplayerFunction::RunImpl() {
74 MediaPlayer::GetInstance()->CloseWindow(); 76 MediaPlayer::GetInstance()->CloseWindow();
75 return true; 77 return true;
76 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698