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

Side by Side Diff: chrome/browser/browser.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
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_init.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 (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.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/animation.h" 10 #include "app/animation.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 400
401 // static 401 // static
402 void Browser::OpenDownloadsWindow(Profile* profile) { 402 void Browser::OpenDownloadsWindow(Profile* profile) {
403 Browser* browser = Browser::Create(profile); 403 Browser* browser = Browser::Create(profile);
404 browser->ShowDownloadsTab(); 404 browser->ShowDownloadsTab();
405 browser->window()->Show(); 405 browser->window()->Show();
406 } 406 }
407 407
408 // static 408 // static
409 void Browser::OpenExtensionsWindow(Profile* profile) {
410 Browser* browser = Browser::Create(profile);
411 browser->ShowExtensionsTab();
412 browser->window()->Show();
413 }
414
415 // static
416 void Browser::OpenHelpWindow(Profile* profile) { 409 void Browser::OpenHelpWindow(Profile* profile) {
417 Browser* browser = Browser::Create(profile); 410 Browser* browser = Browser::Create(profile);
418 browser->OpenHelpTab(); 411 browser->OpenHelpTab();
419 browser->window()->Show(); 412 browser->window()->Show();
420 } 413 }
421 #endif 414 #endif
422 415
416 // static
417 void Browser::OpenExtensionsWindow(Profile* profile) {
418 Browser* browser = Browser::Create(profile);
419 browser->ShowExtensionsTab();
420 browser->window()->Show();
421 }
422
423
423 /////////////////////////////////////////////////////////////////////////////// 424 ///////////////////////////////////////////////////////////////////////////////
424 // Browser, State Storage and Retrieval for UI: 425 // Browser, State Storage and Retrieval for UI:
425 426
426 std::wstring Browser::GetWindowPlacementKey() const { 427 std::wstring Browser::GetWindowPlacementKey() const {
427 std::wstring name(prefs::kBrowserWindowPlacement); 428 std::wstring name(prefs::kBrowserWindowPlacement);
428 if (!app_name_.empty()) { 429 if (!app_name_.empty()) {
429 name.append(L"_"); 430 name.append(L"_");
430 name.append(app_name_); 431 name.append(app_name_);
431 } 432 }
432 return name; 433 return name;
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3321 return; 3322 return;
3322 3323
3323 ExtensionsService* extension_service = profile()->GetExtensionsService(); 3324 ExtensionsService* extension_service = profile()->GetExtensionsService();
3324 if (extension_service && extension_service->is_ready()) { 3325 if (extension_service && extension_service->is_ready()) {
3325 Extension* extension = 3326 Extension* extension =
3326 extension_service->GetExtensionById(app_extension_id, false); 3327 extension_service->GetExtensionById(app_extension_id, false);
3327 if (extension) 3328 if (extension)
3328 contents->SetAppExtension(extension); 3329 contents->SetAppExtension(extension);
3329 } 3330 }
3330 } 3331 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698