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

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 6869024: Add IME UI related extension API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase Created 9 years, 7 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
« no previous file with comments | « chrome/browser/extensions/extension_input_ui_api.cc ('k') | chrome/chrome_browser.gypi » ('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 (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 #include "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "webkit/database/database_util.h" 82 #include "webkit/database/database_util.h"
83 #include "webkit/plugins/npapi/plugin_list.h" 83 #include "webkit/plugins/npapi/plugin_list.h"
84 84
85 #if defined(OS_CHROMEOS) 85 #if defined(OS_CHROMEOS)
86 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 86 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
87 #include "webkit/fileapi/file_system_context.h" 87 #include "webkit/fileapi/file_system_context.h"
88 #include "webkit/fileapi/file_system_mount_point_provider.h" 88 #include "webkit/fileapi/file_system_mount_point_provider.h"
89 #include "webkit/fileapi/file_system_path_manager.h" 89 #include "webkit/fileapi/file_system_path_manager.h"
90 #endif 90 #endif
91 91
92 #if defined(OS_CHROMEOS) && defined(TOUCH_UI)
93 #include "chrome/browser/extensions/extension_input_ui_api.h"
94 #endif
95
92 using base::Time; 96 using base::Time;
93 97
94 namespace errors = extension_manifest_errors; 98 namespace errors = extension_manifest_errors;
95 99
96 namespace { 100 namespace {
97 101
98 #if defined(OS_LINUX) 102 #if defined(OS_LINUX)
99 static const int kOmniboxIconPaddingLeft = 2; 103 static const int kOmniboxIconPaddingLeft = 2;
100 static const int kOmniboxIconPaddingRight = 2; 104 static const int kOmniboxIconPaddingRight = 2;
101 #elif defined(OS_MACOSX) 105 #elif defined(OS_MACOSX)
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 ExtensionAccessibilityEventRouter::GetInstance()->ObserveProfile(profile_); 541 ExtensionAccessibilityEventRouter::GetInstance()->ObserveProfile(profile_);
538 browser_event_router_.reset(new ExtensionBrowserEventRouter(profile_)); 542 browser_event_router_.reset(new ExtensionBrowserEventRouter(profile_));
539 browser_event_router_->Init(); 543 browser_event_router_->Init();
540 preference_event_router_.reset(new ExtensionPreferenceEventRouter(profile_)); 544 preference_event_router_.reset(new ExtensionPreferenceEventRouter(profile_));
541 ExtensionBookmarkEventRouter::GetInstance()->Observe( 545 ExtensionBookmarkEventRouter::GetInstance()->Observe(
542 profile_->GetBookmarkModel()); 546 profile_->GetBookmarkModel());
543 ExtensionCookiesEventRouter::GetInstance()->Init(); 547 ExtensionCookiesEventRouter::GetInstance()->Init();
544 ExtensionManagementEventRouter::GetInstance()->Init(); 548 ExtensionManagementEventRouter::GetInstance()->Init();
545 ExtensionProcessesEventRouter::GetInstance()->ObserveProfile(profile_); 549 ExtensionProcessesEventRouter::GetInstance()->ObserveProfile(profile_);
546 ExtensionWebNavigationEventRouter::GetInstance()->Init(); 550 ExtensionWebNavigationEventRouter::GetInstance()->Init();
551
547 #if defined(OS_CHROMEOS) 552 #if defined(OS_CHROMEOS)
548 ExtensionFileBrowserEventRouter::GetInstance()->ObserveFileSystemEvents( 553 ExtensionFileBrowserEventRouter::GetInstance()->ObserveFileSystemEvents(
549 profile_); 554 profile_);
550 #endif 555 #endif
556
557 #if defined(OS_CHROMEOS) && defined(TOUCH_UI)
558 ExtensionInputUiEventRouter::GetInstance()->Init();
559 #endif
560
551 event_routers_initialized_ = true; 561 event_routers_initialized_ = true;
552 } 562 }
553 563
554 const Extension* ExtensionService::GetExtensionById( 564 const Extension* ExtensionService::GetExtensionById(
555 const std::string& id, bool include_disabled) const { 565 const std::string& id, bool include_disabled) const {
556 return GetExtensionByIdInternal(id, true, include_disabled, false); 566 return GetExtensionByIdInternal(id, true, include_disabled, false);
557 } 567 }
558 568
559 void ExtensionService::Init() { 569 void ExtensionService::Init() {
560 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 570 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 2219
2210 ExtensionService::NaClModuleInfoList::iterator 2220 ExtensionService::NaClModuleInfoList::iterator
2211 ExtensionService::FindNaClModule(const GURL& url) { 2221 ExtensionService::FindNaClModule(const GURL& url) {
2212 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2222 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2213 iter != nacl_module_list_.end(); ++iter) { 2223 iter != nacl_module_list_.end(); ++iter) {
2214 if (iter->url == url) 2224 if (iter->url == url)
2215 return iter; 2225 return iter;
2216 } 2226 }
2217 return nacl_module_list_.end(); 2227 return nacl_module_list_.end();
2218 } 2228 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_input_ui_api.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698