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

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

Issue 370293004: mac: Load the system hotkeys after launch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Histograms and dchecks. Created 6 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 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 #endif // OS_WIN 202 #endif // OS_WIN
203 203
204 #if defined(OS_CHROMEOS) 204 #if defined(OS_CHROMEOS)
205 #include "chrome/browser/chromeos/drive/file_system_util.h" 205 #include "chrome/browser/chromeos/drive/file_system_util.h"
206 #endif 206 #endif
207 207
208 #if defined(USE_ASH) 208 #if defined(USE_ASH)
209 #include "ash/ash_switches.h" 209 #include "ash/ash_switches.h"
210 #endif 210 #endif
211 211
212 #if defined(OS_MACOSX) && !defined(OS_IOS)
213 #include "chrome/browser/ui/cocoa/system_hotkey_helper_mac.h"
214 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
215
212 using base::TimeDelta; 216 using base::TimeDelta;
213 using base::UserMetricsAction; 217 using base::UserMetricsAction;
214 using content::NativeWebKeyboardEvent; 218 using content::NativeWebKeyboardEvent;
215 using content::NavigationController; 219 using content::NavigationController;
216 using content::NavigationEntry; 220 using content::NavigationEntry;
217 using content::OpenURLParams; 221 using content::OpenURLParams;
218 using content::PluginService; 222 using content::PluginService;
219 using content::Referrer; 223 using content::Referrer;
220 using content::RenderWidgetHostView; 224 using content::RenderWidgetHostView;
221 using content::SiteInstance; 225 using content::SiteInstance;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // TODO(beng): move to ChromeBrowserMain: 441 // TODO(beng): move to ChromeBrowserMain:
438 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { 442 if (first_run::ShouldDoPersonalDataManagerFirstRun()) {
439 #if defined(OS_WIN) 443 #if defined(OS_WIN)
440 // Notify PDM that this is a first run. 444 // Notify PDM that this is a first run.
441 ImportAutofillDataWin( 445 ImportAutofillDataWin(
442 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); 446 autofill::PersonalDataManagerFactory::GetForProfile(profile_));
443 #endif // defined(OS_WIN) 447 #endif // defined(OS_WIN)
444 } 448 }
445 449
446 fullscreen_controller_.reset(new FullscreenController(this)); 450 fullscreen_controller_.reset(new FullscreenController(this));
451
452 #if defined(OS_MACOSX) && !defined(OS_IOS)
453 // Load system hotkeys on OSX.
454 SystemHotkeyHelperMac::GetInstance()->DeferredLoadSystemHotkeys();
455 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
Avi (use Gerrit) 2014/07/07 21:57:49 But this isn't a per-Browser thing, this is a syst
erikchen 2014/07/08 01:51:39 I didn't realize that more than 1 Chrome browser i
Avi (use Gerrit) 2014/07/08 02:04:19 I don't have time for a full review right now (I'l
447 } 456 }
448 457
449 Browser::~Browser() { 458 Browser::~Browser() {
450 // Stop observing notifications before continuing with destruction. Profile 459 // Stop observing notifications before continuing with destruction. Profile
451 // destruction will unload extensions and reentrant calls to Browser:: should 460 // destruction will unload extensions and reentrant calls to Browser:: should
452 // be avoided while it is being torn down. 461 // be avoided while it is being torn down.
453 registrar_.RemoveAll(); 462 registrar_.RemoveAll();
454 463
455 // The tab strip should not have any tabs at this point. 464 // The tab strip should not have any tabs at this point.
456 DCHECK(tab_strip_model_->empty()); 465 DCHECK(tab_strip_model_->empty());
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2422 if (contents && !allow_js_access) { 2431 if (contents && !allow_js_access) {
2423 contents->web_contents()->GetController().LoadURL( 2432 contents->web_contents()->GetController().LoadURL(
2424 target_url, 2433 target_url,
2425 content::Referrer(), 2434 content::Referrer(),
2426 content::PAGE_TRANSITION_LINK, 2435 content::PAGE_TRANSITION_LINK,
2427 std::string()); // No extra headers. 2436 std::string()); // No extra headers.
2428 } 2437 }
2429 2438
2430 return contents != NULL; 2439 return contents != NULL;
2431 } 2440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698