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

Side by Side Diff: extensions/browser/api/idle/idle_manager.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
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 "extensions/browser/api/idle/idle_manager.h" 5 #include "extensions/browser/api/idle/idle_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
11 #include "extensions/browser/api/idle/idle_api_constants.h" 11 #include "extensions/browser/api/idle/idle_api_constants.h"
12 #include "extensions/browser/event_router.h" 12 #include "extensions/browser/event_router.h"
13 #include "extensions/browser/extension_registry.h" 13 #include "extensions/browser/extension_registry.h"
14 #include "extensions/common/api/idle.h" 14 #include "extensions/common/api/idle.h"
15 #include "extensions/common/extension.h" 15 #include "extensions/common/extension.h"
16 16
17 namespace keys = extensions::idle_api_constants; 17 namespace keys = extensions::idle_api_constants;
18 namespace idle = extensions::core_api::idle; 18 namespace idle = extensions::api::idle;
19 19
20 namespace extensions { 20 namespace extensions {
21 21
22 namespace { 22 namespace {
23 23
24 const int kDefaultIdleThreshold = 60; 24 const int kDefaultIdleThreshold = 60;
25 const int kPollInterval = 1; 25 const int kPollInterval = 1;
26 26
27 class DefaultEventDelegate : public IdleManager::EventDelegate { 27 class DefaultEventDelegate : public IdleManager::EventDelegate {
28 public: 28 public:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 event_delegate_->OnStateChanged(it->first, new_state); 254 event_delegate_->OnStateChanged(it->first, new_state);
255 monitor.last_state = new_state; 255 monitor.last_state = new_state;
256 listener_count += monitor.listeners; 256 listener_count += monitor.listeners;
257 } 257 }
258 258
259 if (listener_count == 0) 259 if (listener_count == 0)
260 StopPolling(); 260 StopPolling();
261 } 261 }
262 262
263 } // namespace extensions 263 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/idle/idle_api_unittest.cc ('k') | extensions/browser/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698