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

Unified Diff: chrome/browser/chromeos/wm_overview_snapshot.h

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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/wm_overview_controller.cc ('k') | chrome/browser/chromeos/wm_overview_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/wm_overview_snapshot.h
===================================================================
--- chrome/browser/chromeos/wm_overview_snapshot.h (revision 0)
+++ chrome/browser/chromeos/wm_overview_snapshot.h (revision 0)
@@ -0,0 +1,59 @@
+// Copyright (c) 2010 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.
+
+#ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_SNAPSHOT_H_
+#define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_SNAPSHOT_H_
+
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "views/view.h"
+#include "views/widget/widget_gtk.h"
+#include "views/controls/image_view.h"
+
+class Browser;
+
+namespace chromeos {
+
+// A single snapshot displayed by WmOverviewController.
+// WmOverviewSnapshot contains a label, favicon and snapshot.
+class WmOverviewSnapshot : public views::WidgetGtk {
+ public:
+ WmOverviewSnapshot();
+ void Init(const gfx::Size& size, Browser* browser, int index);
+
+ void SetImage(const SkBitmap& image);
+
+ void UpdateIndex(Browser* browser, int index);
+ int index() const { return index_; }
+
+ // Returns the size of the snapshot widget.
+ gfx::Size size() const {
+ gfx::Rect rect;
+ GetBounds(&rect, false);
+ return rect.size();
+ }
+
+ // Has the snapshot been configured? This is true after SetSnapshot
+ // is invoked.
+ bool configured_snapshot() const { return configured_snapshot_; }
+
+ // This resets the configured_snapshot flag for this snapshot so it will
+ // get reloaded the next time we check.
+ void reload_snapshot() { configured_snapshot_ = false; }
+
+ private:
+ // This control is the contents view for this widget.
+ views::ImageView* snapshot_view_;
+
+ // This is the tab index of the snapshot in the associated browser.
+ int index_;
+
+ // This indicates whether or not the snapshot has been configured.
+ bool configured_snapshot_;
+
+ DISALLOW_COPY_AND_ASSIGN(WmOverviewSnapshot);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_SNAPSHOT_H_
Property changes on: chrome/browser/chromeos/wm_overview_snapshot.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/chromeos/wm_overview_controller.cc ('k') | chrome/browser/chromeos/wm_overview_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698