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

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

Issue 10557017: Do not set the appid and window icon in Metro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reworded comment Created 8 years, 6 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // OS_WIN 10 #endif // OS_WIN
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 void Browser::InitBrowserWindow() { 526 void Browser::InitBrowserWindow() {
527 DCHECK(!window_); 527 DCHECK(!window_);
528 528
529 window_ = CreateBrowserWindow(); 529 window_ = CreateBrowserWindow();
530 fullscreen_controller_ = new FullscreenController(window_, profile_, this); 530 fullscreen_controller_ = new FullscreenController(window_, profile_, this);
531 531
532 #if defined(OS_WIN) && !defined(USE_AURA) 532 #if defined(OS_WIN) && !defined(USE_AURA)
533 // Set the app user model id for this application to that of the application 533 // Set the app user model id for this application to that of the application
534 // name. See http://crbug.com/7028. 534 // name. See http://crbug.com/7028.
535 ui::win::SetAppIdForWindow( 535 // Don't set the appid on Metro windows as it is prohibited according to the
536 is_app() && !is_type_panel() ? 536 // "Developing a Metro style enabled desktop browser" guidelines (also skip
537 ShellIntegration::GetAppId(UTF8ToWide(app_name_), profile_->GetPath()) : 537 // setting the appicon for panels as Chrome will not support panels in Metro
538 ShellIntegration::GetChromiumAppId(profile_->GetPath()), 538 // mode).
539 window()->GetNativeWindow()); 539 if (!base::win::GetMetroModule()) {
sky 2012/06/15 21:14:32 Why is this here and not in BrowserView or prefera
540 ui::win::SetAppIdForWindow(
541 is_app() && !is_type_panel() ?
542 ShellIntegration::GetAppId(UTF8ToWide(app_name_), profile_->GetPath()) :
543 ShellIntegration::GetChromiumAppId(profile_->GetPath()),
544 window()->GetNativeWindow());
540 545
541 if (is_type_panel()) { 546 if (is_type_panel()) {
542 ui::win::SetAppIconForWindow(ShellIntegration::GetChromiumIconPath(), 547 ui::win::SetAppIconForWindow(ShellIntegration::GetChromiumIconPath(),
543 window()->GetNativeWindow()); 548 window()->GetNativeWindow());
549 }
544 } 550 }
545 #endif 551 #endif
546 552
547 // Create the extension window controller before sending notifications. 553 // Create the extension window controller before sending notifications.
548 extension_window_controller_.reset( 554 extension_window_controller_.reset(
549 new BrowserExtensionWindowController(this)); 555 new BrowserExtensionWindowController(this));
550 556
551 content::NotificationService::current()->Notify( 557 content::NotificationService::current()->Notify(
552 chrome::NOTIFICATION_BROWSER_WINDOW_READY, 558 chrome::NOTIFICATION_BROWSER_WINDOW_READY,
553 content::Source<Browser>(this), 559 content::Source<Browser>(this),
(...skipping 4671 matching lines...) Expand 10 before | Expand all | Expand 10 after
5225 if (contents && !allow_js_access) { 5231 if (contents && !allow_js_access) {
5226 contents->web_contents()->GetController().LoadURL( 5232 contents->web_contents()->GetController().LoadURL(
5227 target_url, 5233 target_url,
5228 content::Referrer(), 5234 content::Referrer(),
5229 content::PAGE_TRANSITION_LINK, 5235 content::PAGE_TRANSITION_LINK,
5230 std::string()); // No extra headers. 5236 std::string()); // No extra headers.
5231 } 5237 }
5232 5238
5233 return contents != NULL; 5239 return contents != NULL;
5234 } 5240 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698