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

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

Issue 961553002: Enable right clicking on the applist doodle web contents and log the data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 9 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/start_page_service.h ('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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // 559 //
560 // Use a temporary zoom level for this web contents (aka isolated zoom 560 // Use a temporary zoom level for this web contents (aka isolated zoom
561 // mode) so changes to its zoom aren't reflected in any preferences. 561 // mode) so changes to its zoom aren't reflected in any preferences.
562 ui_zoom::ZoomController::FromWebContents(contents_.get()) 562 ui_zoom::ZoomController::FromWebContents(contents_.get())
563 ->SetZoomMode(ui_zoom::ZoomController::ZOOM_MODE_ISOLATED); 563 ->SetZoomMode(ui_zoom::ZoomController::ZOOM_MODE_ISOLATED);
564 // Set to have a zoom level of 0, which corresponds to 100%, so the 564 // Set to have a zoom level of 0, which corresponds to 100%, so the
565 // contents aren't affected by the browser's default zoom level. 565 // contents aren't affected by the browser's default zoom level.
566 ui_zoom::ZoomController::FromWebContents(contents_.get())->SetZoomLevel(0); 566 ui_zoom::ZoomController::FromWebContents(contents_.get())->SetZoomLevel(0);
567 } 567 }
568 568
569 void StartPageService::RenderProcessGone(base::TerminationStatus status) {
570 // TODO(calamity): Remove this log after http://crbug.com/462082 is diagnosed.
Matt Giuca 2015/02/26 04:34:55 I think this can be left in permanently (so drop t
571 if (status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION ||
572 status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ||
573 status == base::TERMINATION_STATUS_PROCESS_CRASHED) {
574 LOG(WARNING) << "App list doodle contents crashed with status " << status;
575 }
576 }
577
569 void StartPageService::WebUILoaded() { 578 void StartPageService::WebUILoaded() {
570 // There's a race condition between the WebUI loading, and calling its JS 579 // There's a race condition between the WebUI loading, and calling its JS
571 // functions. Specifically, calling LoadContents() doesn't mean that the page 580 // functions. Specifically, calling LoadContents() doesn't mean that the page
572 // has loaded, but several code paths make this assumption. This function 581 // has loaded, but several code paths make this assumption. This function
573 // allows us to defer calling JS functions until after the page has finished 582 // allows us to defer calling JS functions until after the page has finished
574 // loading. 583 // loading.
575 webui_finished_loading_ = true; 584 webui_finished_loading_ = true;
576 for (const auto& cb : pending_webui_callbacks_) 585 for (const auto& cb : pending_webui_callbacks_)
577 cb.Run(); 586 cb.Run();
578 pending_webui_callbacks_.clear(); 587 pending_webui_callbacks_.clear();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 676
668 // Check for a new doodle. 677 // Check for a new doodle.
669 content::BrowserThread::PostDelayedTask( 678 content::BrowserThread::PostDelayedTask(
670 content::BrowserThread::UI, FROM_HERE, 679 content::BrowserThread::UI, FROM_HERE,
671 base::Bind(&StartPageService::FetchDoodleJson, 680 base::Bind(&StartPageService::FetchDoodleJson,
672 weak_factory_.GetWeakPtr()), 681 weak_factory_.GetWeakPtr()),
673 recheck_delay); 682 recheck_delay);
674 } 683 }
675 684
676 } // namespace app_list 685 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698