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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 661454: Initial implementation of status tray functionality (mac-only, currently). (Closed)
Patch Set: more changes per review feedback Created 10 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include "app/clipboard/clipboard.h" 7 #include "app/clipboard/clipboard.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 31 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
32 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" 32 #include "chrome/browser/net/sqlite_persistent_cookie_store.h"
33 #include "chrome/browser/notifications/notification_ui_manager.h" 33 #include "chrome/browser/notifications/notification_ui_manager.h"
34 #include "chrome/browser/plugin_service.h" 34 #include "chrome/browser/plugin_service.h"
35 #include "chrome/browser/pref_service.h" 35 #include "chrome/browser/pref_service.h"
36 #include "chrome/browser/printing/print_job_manager.h" 36 #include "chrome/browser/printing/print_job_manager.h"
37 #include "chrome/browser/profile_manager.h" 37 #include "chrome/browser/profile_manager.h"
38 #include "chrome/browser/renderer_host/render_process_host.h" 38 #include "chrome/browser/renderer_host/render_process_host.h"
39 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 39 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
40 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 40 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
41 #include "chrome/browser/status_icons/status_tray_manager.h"
41 #include "chrome/common/chrome_constants.h" 42 #include "chrome/common/chrome_constants.h"
42 #include "chrome/common/chrome_paths.h" 43 #include "chrome/common/chrome_paths.h"
43 #include "chrome/common/chrome_switches.h" 44 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/extensions/extension_l10n_util.h" 45 #include "chrome/common/extensions/extension_l10n_util.h"
45 #include "chrome/common/notification_service.h" 46 #include "chrome/common/notification_service.h"
46 #include "chrome/common/pref_names.h" 47 #include "chrome/common/pref_names.h"
47 #include "chrome/common/url_constants.h" 48 #include "chrome/common/url_constants.h"
48 #include "ipc/ipc_logging.h" 49 #include "ipc/ipc_logging.h"
49 #include "webkit/database/database_tracker.h" 50 #include "webkit/database/database_tracker.h"
50 51
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 DCHECK(notification_ui_manager_.get() == NULL); 425 DCHECK(notification_ui_manager_.get() == NULL);
425 notification_ui_manager_.reset(NotificationUIManager::Create()); 426 notification_ui_manager_.reset(NotificationUIManager::Create());
426 created_notification_ui_manager_ = true; 427 created_notification_ui_manager_ = true;
427 } 428 }
428 429
429 void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) { 430 void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) {
430 locale_ = locale; 431 locale_ = locale;
431 extension_l10n_util::SetProcessLocale(locale); 432 extension_l10n_util::SetProcessLocale(locale);
432 } 433 }
433 434
435 void BrowserProcessImpl::CreateStatusTrayManager() {
436 DCHECK(status_tray_manager_.get() == NULL);
437 status_tray_manager_.reset(new StatusTrayManager());
438 }
439
434 // The BrowserProcess object must outlive the file thread so we use traits 440 // The BrowserProcess object must outlive the file thread so we use traits
435 // which don't do any management. 441 // which don't do any management.
436 template <> 442 template <>
437 struct RunnableMethodTraits<BrowserProcessImpl> { 443 struct RunnableMethodTraits<BrowserProcessImpl> {
438 void RetainCallee(BrowserProcessImpl* process) {} 444 void RetainCallee(BrowserProcessImpl* process) {}
439 void ReleaseCallee(BrowserProcessImpl* process) {} 445 void ReleaseCallee(BrowserProcessImpl* process) {}
440 }; 446 };
441 447
442 void BrowserProcessImpl::CheckForInspectorFiles() { 448 void BrowserProcessImpl::CheckForInspectorFiles() {
443 file_thread()->message_loop()->PostTask 449 file_thread()->message_loop()->PostTask
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 DCHECK(file_thread_->message_loop() == MessageLoop::current()); 494 DCHECK(file_thread_->message_loop() == MessageLoop::current());
489 bool result = false; 495 bool result = false;
490 496
491 FilePath inspector_dir; 497 FilePath inspector_dir;
492 if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { 498 if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) {
493 result = file_util::PathExists(inspector_dir); 499 result = file_util::PathExists(inspector_dir);
494 } 500 }
495 501
496 have_inspector_files_ = result; 502 have_inspector_files_ = result;
497 } 503 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/cocoa/status_icons/status_icon_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698