summaryrefslogtreecommitdiffstats
path: root/ui/base/ime/chromeos/mock_component_extension_ime_manager_delegate.cc
blob: 82f6c13e5fd8d69e2715c9967e00b208ad4fad95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/base/ime/chromeos/mock_component_extension_ime_manager_delegate.h"

#include "base/logging.h"
#include "ui/base/ime/chromeos/component_extension_ime_manager.h"
#include "ui/base/ime/chromeos/extension_ime_util.h"

namespace chromeos {
namespace input_method {

MockComponentExtIMEManagerDelegate::MockComponentExtIMEManagerDelegate()
    : load_call_count_(0),
      unload_call_count_(0) {
}

MockComponentExtIMEManagerDelegate::~MockComponentExtIMEManagerDelegate() {
}

std::vector<ComponentExtensionIME>
    MockComponentExtIMEManagerDelegate::ListIME() {
  return ime_list_;
}

void MockComponentExtIMEManagerDelegate::Load(Profile* profile,
                                              const std::string& extension_id,
                                              const std::string& manifest,
                                              const base::FilePath& path) {
  last_loaded_extension_id_ = extension_id;
  load_call_count_++;
}

void MockComponentExtIMEManagerDelegate::Unload(Profile* profile,
                                                const std::string& extension_id,
                                                const base::FilePath& path) {
  unload_call_count_++;
  last_unloaded_extension_id_ = extension_id;
}

}  // namespace input_method
}  // namespace chromeos