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

Side by Side Diff: chrome/browser/ui/views/frame/contents_container.cc

Issue 12036075: alternate ntp: fix website page jankiness when suggestions show and top bars are hidden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed all comments Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/views/frame/contents_container.h" 5 #include "chrome/browser/ui/views/frame/contents_container.h"
6 6
7 #include "grit/theme_resources.h" 7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/image/image_skia.h" 10 #include "ui/gfx/image/image_skia.h"
11 #include "ui/views/controls/webview/webview.h"
12 11
13 // static 12 // static
14 const char ContentsContainer::kViewClassName[] = 13 const char ContentsContainer::kViewClassName[] =
15 "browser/ui/views/frame/ContentsContainer"; 14 "browser/ui/views/frame/ContentsContainer";
16 15
17 namespace { 16 namespace {
18 17
19 int PreviewHeightInPixels(int parent_height, int preview_height, 18 int PreviewHeightInPixels(int parent_height, int preview_height,
20 InstantSizeUnits preview_height_units) { 19 InstantSizeUnits preview_height_units) {
21 preview_height = std::max(0, preview_height); 20 preview_height = std::max(0, preview_height);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 237
239 RemoveChildView(shadow_view_.get()); 238 RemoveChildView(shadow_view_.get());
240 if (delete_view) 239 if (delete_view)
241 shadow_view_.reset(NULL); 240 shadow_view_.reset(NULL);
242 return true; 241 return true;
243 } 242 }
244 243
245 std::string ContentsContainer::GetClassName() const { 244 std::string ContentsContainer::GetClassName() const {
246 return kViewClassName; 245 return kViewClassName;
247 } 246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698