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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_renderer_data.h

Issue 6599017: Don't repaint tab when TabRenderData hasn't changed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 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
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 23 matching lines...) Expand all
34 34
35 // This interprets the crashed status to decide whether or not this 35 // This interprets the crashed status to decide whether or not this
36 // render data represents a tab that is "crashed" (i.e. the render 36 // render data represents a tab that is "crashed" (i.e. the render
37 // process died unexpectedly). 37 // process died unexpectedly).
38 bool IsCrashed() const { 38 bool IsCrashed() const {
39 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || 39 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ||
40 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || 40 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED ||
41 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); 41 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION);
42 } 42 }
43 43
44 // Returns true if the TabRendererData is same as given |data|. Two favicons
45 // are considered equals if two SkBitmaps point to the same SkPixelRef object.
46 bool Equals(const TabRendererData& data) {
47 return
48 favicon.pixelRef() &&
49 favicon.pixelRef() == data.favicon.pixelRef() &&
50 favicon.pixelRefOffset() == data.favicon.pixelRefOffset() &&
oshima 2011/02/26 00:18:29 Brett, I'm assuming that chrome does not change th
brettw 2011/02/26 03:26:04 Good question. This is *probably* OK but I'm not s
51 network_state == data.network_state &&
52 title == data.title &&
53 loading == data.loading &&
54 crashed_status == data.crashed_status &&
55 off_the_record == data.off_the_record &&
56 show_icon == data.show_icon &&
57 mini == data.mini &&
58 blocked == data.blocked &&
59 app == data.app;
60 }
61
44 SkBitmap favicon; 62 SkBitmap favicon;
45 NetworkState network_state; 63 NetworkState network_state;
46 string16 title; 64 string16 title;
47 bool loading; 65 bool loading;
48 base::TerminationStatus crashed_status; 66 base::TerminationStatus crashed_status;
49 bool off_the_record; 67 bool off_the_record;
50 bool show_icon; 68 bool show_icon;
51 bool mini; 69 bool mini;
52 bool blocked; 70 bool blocked;
53 bool app; 71 bool app;
54 }; 72 };
55 73
56 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ 74 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698