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

Side by Side Diff: chrome/browser/extensions/tab_helper.cc

Issue 142993002: Remove unused members from WebApplicationInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 10 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) 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/extensions/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 WebApplicationInfo install_info(web_app_info_); 349 WebApplicationInfo install_info(web_app_info_);
350 if (install_info.app_url.is_empty()) 350 if (install_info.app_url.is_empty())
351 install_info.app_url = web_contents()->GetURL(); 351 install_info.app_url = web_contents()->GetURL();
352 352
353 if (install_info.title.empty()) 353 if (install_info.title.empty())
354 install_info.title = web_contents()->GetTitle(); 354 install_info.title = web_contents()->GetTitle();
355 if (install_info.title.empty()) 355 if (install_info.title.empty())
356 install_info.title = base::UTF8ToUTF16(install_info.app_url.spec()); 356 install_info.title = base::UTF8ToUTF16(install_info.app_url.spec());
357 357
358 install_info.is_bookmark_app = true;
359
360 // Add the downloaded icons. Extensions only allow certain icon sizes. First 358 // Add the downloaded icons. Extensions only allow certain icon sizes. First
361 // populate icons that match the allowed sizes exactly and then downscale 359 // populate icons that match the allowed sizes exactly and then downscale
362 // remaining icons to the closest allowed size that doesn't yet have an icon. 360 // remaining icons to the closest allowed size that doesn't yet have an icon.
363 std::set<int> allowed_sizes( 361 std::set<int> allowed_sizes(
364 extension_misc::kExtensionIconSizes, 362 extension_misc::kExtensionIconSizes,
365 extension_misc::kExtensionIconSizes + 363 extension_misc::kExtensionIconSizes +
366 extension_misc::kNumExtensionIconSizes); 364 extension_misc::kNumExtensionIconSizes);
367 std::vector<SkBitmap> downloaded_icons; 365 std::vector<SkBitmap> downloaded_icons;
368 for (FaviconDownloader::FaviconMap::const_iterator map_it = bitmaps.begin(); 366 for (FaviconDownloader::FaviconMap::const_iterator map_it = bitmaps.begin();
369 map_it != bitmaps.end(); ++map_it) { 367 map_it != bitmaps.end(); ++map_it) {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 687 }
690 } 688 }
691 689
692 void TabHelper::SetTabId(RenderViewHost* render_view_host) { 690 void TabHelper::SetTabId(RenderViewHost* render_view_host) {
693 render_view_host->Send( 691 render_view_host->Send(
694 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), 692 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(),
695 SessionID::IdForTab(web_contents()))); 693 SessionID::IdForTab(web_contents())));
696 } 694 }
697 695
698 } // namespace extensions 696 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/convert_web_app_unittest.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698