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

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

Issue 911373002: Make start page logo web contents transparent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_white_flash_somehow
Patch Set: disable resize background Created 5 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
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_list/start_page_service.h" 5 #include "chrome/browser/ui/app_list/start_page_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 22 matching lines...) Expand all
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "components/search_engines/template_url_prepopulate_data.h" 34 #include "components/search_engines/template_url_prepopulate_data.h"
35 #include "components/search_engines/template_url_service.h" 35 #include "components/search_engines/template_url_service.h"
36 #include "components/ui/zoom/zoom_controller.h" 36 #include "components/ui/zoom/zoom_controller.h"
37 #include "content/public/browser/browser_thread.h" 37 #include "content/public/browser/browser_thread.h"
38 #include "content/public/browser/notification_details.h" 38 #include "content/public/browser/notification_details.h"
39 #include "content/public/browser/notification_observer.h" 39 #include "content/public/browser/notification_observer.h"
40 #include "content/public/browser/notification_registrar.h" 40 #include "content/public/browser/notification_registrar.h"
41 #include "content/public/browser/notification_service.h" 41 #include "content/public/browser/notification_service.h"
42 #include "content/public/browser/notification_source.h" 42 #include "content/public/browser/notification_source.h"
43 #include "content/public/browser/render_view_host.h"
44 #include "content/public/browser/render_widget_host_view.h"
43 #include "content/public/browser/speech_recognition_session_preamble.h" 45 #include "content/public/browser/speech_recognition_session_preamble.h"
44 #include "content/public/browser/web_contents.h" 46 #include "content/public/browser/web_contents.h"
45 #include "content/public/browser/web_contents_delegate.h" 47 #include "content/public/browser/web_contents_delegate.h"
46 #include "extensions/browser/extension_system_provider.h" 48 #include "extensions/browser/extension_system_provider.h"
47 #include "extensions/browser/extensions_browser_client.h" 49 #include "extensions/browser/extensions_browser_client.h"
48 #include "extensions/common/extension.h" 50 #include "extensions/common/extension.h"
49 #include "net/base/load_flags.h" 51 #include "net/base/load_flags.h"
50 #include "net/base/network_change_notifier.h" 52 #include "net/base/network_change_notifier.h"
51 #include "net/url_request/url_fetcher.h" 53 #include "net/url_request/url_fetcher.h"
52 #include "ui/app_list/app_list_switches.h" 54 #include "ui/app_list/app_list_switches.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // by this object. Otherwise it will react to DidNavigateMainFrame after this 577 // by this object. Otherwise it will react to DidNavigateMainFrame after this
576 // object does, resetting the zoom mode in the process. 578 // object does, resetting the zoom mode in the process.
577 ui_zoom::ZoomController::CreateForWebContents(contents_.get()); 579 ui_zoom::ZoomController::CreateForWebContents(contents_.get());
578 Observe(contents_.get()); 580 Observe(contents_.get());
579 581
580 contents_->GetController().LoadURL( 582 contents_->GetController().LoadURL(
581 GURL(chrome::kChromeUIAppListStartPageURL), 583 GURL(chrome::kChromeUIAppListStartPageURL),
582 content::Referrer(), 584 content::Referrer(),
583 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 585 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
584 std::string()); 586 std::string());
587 contents_->GetRenderViewHost()->GetView()->SetBackgroundColor(
588 SK_ColorTRANSPARENT);
585 } 589 }
586 590
587 void StartPageService::UnloadContents() { 591 void StartPageService::UnloadContents() {
588 contents_.reset(); 592 contents_.reset();
589 webui_finished_loading_ = false; 593 webui_finished_loading_ = false;
590 } 594 }
591 595
592 void StartPageService::FetchDoodleJson() { 596 void StartPageService::FetchDoodleJson() {
593 GURL::Replacements replacements; 597 GURL::Replacements replacements;
594 replacements.SetPathStr(kDoodleJsonPath); 598 replacements.SetPathStr(kDoodleJsonPath);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 644
641 // Check for a new doodle. 645 // Check for a new doodle.
642 content::BrowserThread::PostDelayedTask( 646 content::BrowserThread::PostDelayedTask(
643 content::BrowserThread::UI, FROM_HERE, 647 content::BrowserThread::UI, FROM_HERE,
644 base::Bind(&StartPageService::FetchDoodleJson, 648 base::Bind(&StartPageService::FetchDoodleJson,
645 weak_factory_.GetWeakPtr()), 649 weak_factory_.GetWeakPtr()),
646 recheck_delay); 650 recheck_delay);
647 } 651 }
648 652
649 } // namespace app_list 653 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698