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

Side by Side Diff: chrome/browser/chromeos/wm_overview_fav_icon.cc

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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/chromeos/wm_ipc.cc ('k') | chrome/browser/chromeos/wm_overview_snapshot.cc » ('j') | 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 #include "chrome/browser/chromeos/wm_overview_fav_icon.h" 5 #include "chrome/browser/chromeos/wm_overview_fav_icon.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/x11_util.h"
10 #include "chrome/browser/chromeos/wm_ipc.h" 9 #include "chrome/browser/chromeos/wm_ipc.h"
11 #include "chrome/browser/chromeos/wm_overview_snapshot.h" 10 #include "chrome/browser/chromeos/wm_overview_snapshot.h"
12 #include "skia/ext/image_operations.h" 11 #include "skia/ext/image_operations.h"
13 #include "third_party/cros/chromeos_wm_ipc_enums.h" 12 #include "third_party/cros/chromeos_wm_ipc_enums.h"
14 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/base/x/x11_util.h"
15 #include "views/controls/image_view.h" 15 #include "views/controls/image_view.h"
16 #include "views/controls/label.h" 16 #include "views/controls/label.h"
17 #include "views/grid_layout.h" 17 #include "views/grid_layout.h"
18 18
19 using std::vector; 19 using std::vector;
20 20
21 #if !defined(OS_CHROMEOS) 21 #if !defined(OS_CHROMEOS)
22 #error This file is only meant to be compiled for ChromeOS 22 #error This file is only meant to be compiled for ChromeOS
23 #endif 23 #endif
24 24
(...skipping 10 matching lines...) Expand all
35 MakeTransparent(); 35 MakeTransparent();
36 36
37 fav_icon_view_ = new views::ImageView(); 37 fav_icon_view_ = new views::ImageView();
38 38
39 WidgetGtk::Init(NULL, gfx::Rect(0, 0, 0, 0)); 39 WidgetGtk::Init(NULL, gfx::Rect(0, 0, 0, 0));
40 40
41 SetContentsView(fav_icon_view_); 41 SetContentsView(fav_icon_view_);
42 42
43 // Set the window type 43 // Set the window type
44 vector<int> params; 44 vector<int> params;
45 params.push_back(x11_util::GetX11WindowFromGtkWidget( 45 params.push_back(ui::GetX11WindowFromGtkWidget(
46 GTK_WIDGET(snapshot->GetNativeView()))); 46 GTK_WIDGET(snapshot->GetNativeView())));
47 WmIpc::instance()->SetWindowType( 47 WmIpc::instance()->SetWindowType(
48 GetNativeView(), 48 GetNativeView(),
49 WM_IPC_WINDOW_CHROME_TAB_FAV_ICON, 49 WM_IPC_WINDOW_CHROME_TAB_FAV_ICON,
50 &params); 50 &params);
51 } 51 }
52 52
53 53
54 void WmOverviewFavIcon::SetFavIcon(const SkBitmap& image) { 54 void WmOverviewFavIcon::SetFavIcon(const SkBitmap& image) {
55 CHECK(fav_icon_view_) << "Init not called before setting fav icon."; 55 CHECK(fav_icon_view_) << "Init not called before setting fav icon.";
(...skipping 18 matching lines...) Expand all
74 74
75 // Reset the bounds to the size of the image. 75 // Reset the bounds to the size of the image.
76 gfx::Rect bounds; 76 gfx::Rect bounds;
77 GetBounds(&bounds, false); 77 GetBounds(&bounds, false);
78 bounds.set_width(icon.width()); 78 bounds.set_width(icon.width());
79 bounds.set_height(icon.height()); 79 bounds.set_height(icon.height());
80 SetBounds(bounds); 80 SetBounds(bounds);
81 } 81 }
82 82
83 } // namespace chromeos 83 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/wm_ipc.cc ('k') | chrome/browser/chromeos/wm_overview_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698