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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 5790002: [gtk] tabcontents fade-out for instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fixes Created 10 years 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/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.cc
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index cdc023d050f4d8ba3d10898ad48505f7063e9061..34ec8923ebe4eb9d6ed03c99f62a91d245e7d5d8 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -798,6 +798,19 @@ void TabContents::DidBecomeSelected() {
last_selected_time_ = base::TimeTicks::Now();
}
+void TabContents::FadeForInstant() {
+ RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ SkColor whitish = SkColorSetARGB(192, 255, 255, 255);
+ if (rwhv)
+ rwhv->SetVisuallyDeemphasized(&whitish, true);
+}
+
+void TabContents::CancelInstantFade() {
+ RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->SetVisuallyDeemphasized(NULL, false);
+}
+
void TabContents::WasHidden() {
if (!capturing_contents()) {
// |render_view_host()| can be NULL if the user middle clicks a link to open
@@ -973,8 +986,10 @@ ConstrainedWindow* TabContents::CreateConstrainedDialog(
void TabContents::BlockTabContent(bool blocked) {
RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ // 70% opaque grey.
+ SkColor greyish = SkColorSetARGB(178, 0, 0, 0);
if (rwhv)
- rwhv->SetVisuallyDeemphasized(blocked);
+ rwhv->SetVisuallyDeemphasized(blocked ? &greyish : NULL, false);
render_view_host()->set_ignore_input_events(blocked);
if (delegate_)
delegate_->SetTabContentBlocked(this, blocked);
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698