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

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

Issue 242613004: Replace NOTIFICATION_EXTENSION_LOADED to NOTIFICATION_EXTENSION_LOADED_DEPRECATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 unload_controller_.reset(new chrome::UnloadController(this)); 369 unload_controller_.reset(new chrome::UnloadController(this));
370 370
371 if (!app_name_.empty()) 371 if (!app_name_.empty())
372 chrome::RegisterAppPrefs(app_name_, profile_); 372 chrome::RegisterAppPrefs(app_name_, profile_);
373 tab_strip_model_->AddObserver(this); 373 tab_strip_model_->AddObserver(this);
374 374
375 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get())); 375 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get()));
376 search_model_.reset(new SearchModel()); 376 search_model_.reset(new SearchModel());
377 search_delegate_.reset(new SearchDelegate(search_model_.get())); 377 search_delegate_.reset(new SearchDelegate(search_model_.get()));
378 378
379 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 379 registrar_.Add(this,
380 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
380 content::Source<Profile>(profile_->GetOriginalProfile())); 381 content::Source<Profile>(profile_->GetOriginalProfile()));
381 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 382 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
382 content::Source<Profile>(profile_->GetOriginalProfile())); 383 content::Source<Profile>(profile_->GetOriginalProfile()));
383 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 384 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
384 content::Source<Profile>(profile_->GetOriginalProfile())); 385 content::Source<Profile>(profile_->GetOriginalProfile()));
385 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 386 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
386 content::NotificationService::AllSources()); 387 content::NotificationService::AllSources());
387 #if defined(ENABLE_THEMES) 388 #if defined(ENABLE_THEMES)
388 registrar_.Add( 389 registrar_.Add(
389 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 390 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 break; 1914 break;
1914 } 1915 }
1915 1916
1916 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { 1917 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: {
1917 Profile* profile = content::Source<Profile>(source).ptr(); 1918 Profile* profile = content::Source<Profile>(source).ptr();
1918 if (profile_->IsSameProfile(profile) && window()->GetLocationBar()) 1919 if (profile_->IsSameProfile(profile) && window()->GetLocationBar())
1919 window()->GetLocationBar()->InvalidatePageActions(); 1920 window()->GetLocationBar()->InvalidatePageActions();
1920 break; 1921 break;
1921 } 1922 }
1922 1923
1923 case chrome::NOTIFICATION_EXTENSION_LOADED: 1924 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED:
1924 chrome::UpdateCommandEnabled( 1925 chrome::UpdateCommandEnabled(
1925 this, 1926 this,
1926 IDC_BOOKMARK_PAGE, 1927 IDC_BOOKMARK_PAGE,
1927 !chrome::ShouldRemoveBookmarkThisPageUI(profile_)); 1928 !chrome::ShouldRemoveBookmarkThisPageUI(profile_));
1928 chrome::UpdateCommandEnabled( 1929 chrome::UpdateCommandEnabled(
1929 this, 1930 this,
1930 IDC_BOOKMARK_ALL_TABS, 1931 IDC_BOOKMARK_ALL_TABS,
1931 !chrome::ShouldRemoveBookmarkOpenPagesUI(profile_)); 1932 !chrome::ShouldRemoveBookmarkOpenPagesUI(profile_));
1932 // fallthrough 1933 // fallthrough
1933 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 1934 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 if (contents && !allow_js_access) { 2412 if (contents && !allow_js_access) {
2412 contents->web_contents()->GetController().LoadURL( 2413 contents->web_contents()->GetController().LoadURL(
2413 target_url, 2414 target_url,
2414 content::Referrer(), 2415 content::Referrer(),
2415 content::PAGE_TRANSITION_LINK, 2416 content::PAGE_TRANSITION_LINK,
2416 std::string()); // No extra headers. 2417 std::string()); // No extra headers.
2417 } 2418 }
2418 2419
2419 return contents != NULL; 2420 return contents != NULL;
2420 } 2421 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698