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

Side by Side Diff: components/dom_distiller/webui/dom_distiller_ui.cc

Issue 396503003: DomDistiller: fix 0 document width (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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 "components/dom_distiller/webui/dom_distiller_ui.h" 5 #include "components/dom_distiller/webui/dom_distiller_ui.h"
6 6
7 #include "components/dom_distiller/core/dom_distiller_constants.h" 7 #include "components/dom_distiller/core/dom_distiller_constants.h"
8 #include "components/dom_distiller/core/dom_distiller_service.h" 8 #include "components/dom_distiller/core/dom_distiller_service.h"
9 #include "components/dom_distiller/webui/dom_distiller_handler.h" 9 #include "components/dom_distiller/webui/dom_distiller_handler.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES); 45 IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES);
46 source->AddLocalizedString("refreshButtonLabel", 46 source->AddLocalizedString("refreshButtonLabel",
47 IDS_DOM_DISTILLER_WEBUI_REFRESH); 47 IDS_DOM_DISTILLER_WEBUI_REFRESH);
48 48
49 content::BrowserContext* browser_context = 49 content::BrowserContext* browser_context =
50 web_ui->GetWebContents()->GetBrowserContext(); 50 web_ui->GetWebContents()->GetBrowserContext();
51 content::WebUIDataSource::Add(browser_context, source); 51 content::WebUIDataSource::Add(browser_context, source);
52 source->SetJsonPath("strings.js"); 52 source->SetJsonPath("strings.js");
53 53
54 // Add message handler. 54 // Add message handler.
55 web_ui->AddMessageHandler(new DomDistillerHandler(service, scheme)); 55 web_ui->AddMessageHandler(new DomDistillerHandler(service, scheme,
56 web_ui->GetWebContents()->GetContainerBounds().size()));
nyquist 2014/07/15 17:13:03 What would happen if the user resizes the browser
Yaron 2014/07/16 17:46:28 Agreed. I thought these handlers were actually lon
nyquist 2014/07/16 19:20:49 I think they're created through |WebContentsImpl::
kuan 2014/07/17 09:57:26 Done.
56 } 57 }
57 58
58 DomDistillerUi::~DomDistillerUi() {} 59 DomDistillerUi::~DomDistillerUi() {}
59 60
60 } // namespace dom_distiller 61 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698