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

Unified Diff: chrome/browser/chromeos/tab_first_render_watcher.cc

Issue 8417005: Share TabFirstRenderWatcher with HtmlDialogView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/tab_first_render_watcher.h ('k') | chrome/browser/tab_first_render_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/tab_first_render_watcher.cc
diff --git a/chrome/browser/chromeos/tab_first_render_watcher.cc b/chrome/browser/chromeos/tab_first_render_watcher.cc
deleted file mode 100644
index 66344a4bddf9d670edc10db274af0332aa0047c0..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/tab_first_render_watcher.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/tab_first_render_watcher.h"
-
-#include "content/browser/renderer_host/render_widget_host.h"
-#include "content/browser/renderer_host/render_view_host.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_source.h"
-#include "content/public/browser/notification_types.h"
-
-namespace chromeos {
-
-TabFirstRenderWatcher::TabFirstRenderWatcher(TabContents* tab,
- Delegate* delegate)
- : state_(NONE),
- tab_contents_(tab),
- delegate_(delegate) {
- registrar_.Add(this,
- content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB,
- content::Source<TabContents>(tab_contents_));
- registrar_.Add(this,
- content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
- content::Source<TabContents>(tab_contents_));
-}
-
-void TabFirstRenderWatcher::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: {
- RenderWidgetHost* rwh = content::Details<RenderWidgetHost>(details).ptr();
- registrar_.Add(this,
- content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- content::Source<RenderWidgetHost>(rwh));
- delegate_->OnRenderHostCreated(
- content::Details<RenderViewHost>(details).ptr());
- break;
- }
- case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME:
- if (state_ == NONE) {
- state_ = LOADED;
- delegate_->OnTabMainFrameLoaded();
- }
- break;
- case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT:
- if (state_ == LOADED) {
- state_ = FIRST_PAINT;
- delegate_->OnTabMainFrameFirstRender();
- }
- break;
- default:
- NOTREACHED() << "unknown type" << type;
- }
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/tab_first_render_watcher.h ('k') | chrome/browser/tab_first_render_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698