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

Side by Side 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, 7 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_SNAPSHOT_H_
6 #define CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_SNAPSHOT_H_
7
8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "views/view.h"
10 #include "views/widget/widget_gtk.h"
11 #include "views/controls/image_view.h"
12
13 class Browser;
14
15 namespace chromeos {
16
17 // A single snapshot displayed by WmOverviewController.
18 // WmOverviewSnapshot contains a label, favicon and snapshot.
19 class WmOverviewSnapshot : public views::WidgetGtk {
20 public:
21 WmOverviewSnapshot();
22 void Init(const gfx::Size& size, Browser* browser, int index);
23
24 void SetImage(const SkBitmap& image);
25
26 void UpdateIndex(Browser* browser, int index);
27 int index() const { return index_; }
28
29 // Returns the size of the snapshot widget.
30 gfx::Size size() const {
31 gfx::Rect rect;
32 GetBounds(&rect, false);
33 return rect.size();
34 }
35
36 // Has the snapshot been configured? This is true after SetSnapshot
37 // is invoked.
38 bool configured_snapshot() const { return configured_snapshot_; }
39
40 // This resets the configured_snapshot flag for this snapshot so it will
41 // get reloaded the next time we check.
42 void reload_snapshot() { configured_snapshot_ = false; }
43
44 private:
45 // This control is the contents view for this widget.
46 views::ImageView* snapshot_view_;
47
48 // This is the tab index of the snapshot in the associated browser.
49 int index_;
50
51 // This indicates whether or not the snapshot has been configured.
52 bool configured_snapshot_;
53
54 DISALLOW_COPY_AND_ASSIGN(WmOverviewSnapshot);
55 };
56
57 } // namespace chromeos
58
59 #endif // CHROME_BROWSER_CHROMEOS_WM_OVERVIEW_SNAPSHOT_H_
OLDNEW
« 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