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

Side by Side Diff: media/midi/midi_manager_android.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 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
« no previous file with comments | « media/midi/midi_input_port_android.cc ('k') | media/midi/midi_output_port_android.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/midi/midi_manager_android.h" 5 #include "media/midi/midi_manager_android.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/android/context_utils.h" 8 #include "base/android/context_utils.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 26 matching lines...) Expand all
37 37
38 MidiManagerAndroid::~MidiManagerAndroid() {} 38 MidiManagerAndroid::~MidiManagerAndroid() {}
39 39
40 void MidiManagerAndroid::StartInitialization() { 40 void MidiManagerAndroid::StartInitialization() {
41 JNIEnv* env = base::android::AttachCurrentThread(); 41 JNIEnv* env = base::android::AttachCurrentThread();
42 42
43 uintptr_t pointer = reinterpret_cast<uintptr_t>(this); 43 uintptr_t pointer = reinterpret_cast<uintptr_t>(this);
44 raw_manager_.Reset(Java_MidiManagerAndroid_create( 44 raw_manager_.Reset(Java_MidiManagerAndroid_create(
45 env, base::android::GetApplicationContext(), pointer)); 45 env, base::android::GetApplicationContext(), pointer));
46 scheduler_.reset(new MidiScheduler(this)); 46 scheduler_.reset(new MidiScheduler(this));
47 Java_MidiManagerAndroid_initialize(env, raw_manager_.obj()); 47 Java_MidiManagerAndroid_initialize(env, raw_manager_);
48 } 48 }
49 49
50 void MidiManagerAndroid::DispatchSendMidiData(MidiManagerClient* client, 50 void MidiManagerAndroid::DispatchSendMidiData(MidiManagerClient* client,
51 uint32_t port_index, 51 uint32_t port_index,
52 const std::vector<uint8_t>& data, 52 const std::vector<uint8_t>& data,
53 double timestamp) { 53 double timestamp) {
54 if (port_index >= all_output_ports_.size()) { 54 if (port_index >= all_output_ports_.size()) {
55 // |port_index| is provided by a renderer so we can't believe that it is 55 // |port_index| is provided by a renderer so we can't believe that it is
56 // in the valid range. 56 // in the valid range.
57 return; 57 return;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 devices_.push_back(device.release()); 162 devices_.push_back(device.release());
163 } 163 }
164 164
165 bool MidiManagerAndroid::Register(JNIEnv* env) { 165 bool MidiManagerAndroid::Register(JNIEnv* env) {
166 return RegisterNativesImpl(env); 166 return RegisterNativesImpl(env);
167 } 167 }
168 168
169 } // namespace midi 169 } // namespace midi
170 } // namespace media 170 } // namespace media
OLDNEW
« no previous file with comments | « media/midi/midi_input_port_android.cc ('k') | media/midi/midi_output_port_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698