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

Side by Side Diff: chrome/browser/ui/apps/chrome_shell_window_delegate.cc

Issue 140323010: Ash:Shelf - Cleanup of Alternate Shelf (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ButtonSize and ButtonSpacing moved to shelf_constants Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/apps/chrome_shell_window_delegate.h" 5 #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
6 6
7 #include "ash/shelf/shelf_constants.h"
7 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
9 #include "chrome/browser/file_select_helper.h" 10 #include "chrome/browser/file_select_helper.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 11 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
11 #include "chrome/browser/platform_util.h" 12 #include "chrome/browser/platform_util.h"
12 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_dialogs.h" 14 #include "chrome/browser/ui/browser_dialogs.h"
14 #include "chrome/browser/ui/browser_tabstrip.h" 15 #include "chrome/browser/ui/browser_tabstrip.h"
15 #include "chrome/browser/ui/browser_window.h" 16 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 17 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 content::WebContents* web_contents, 139 content::WebContents* web_contents,
139 const content::MediaStreamRequest& request, 140 const content::MediaStreamRequest& request,
140 const content::MediaResponseCallback& callback, 141 const content::MediaResponseCallback& callback,
141 const extensions::Extension* extension) { 142 const extensions::Extension* extension) {
142 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( 143 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
143 web_contents, request, callback, extension); 144 web_contents, request, callback, extension);
144 } 145 }
145 146
146 int ChromeShellWindowDelegate::PreferredIconSize() { 147 int ChromeShellWindowDelegate::PreferredIconSize() {
147 #if defined(USE_ASH) 148 #if defined(USE_ASH)
148 return ash::kShelfPreferredSize; 149 return ash::kShelfSize;
149 #else 150 #else
150 return extension_misc::EXTENSION_ICON_SMALL; 151 return extension_misc::EXTENSION_ICON_SMALL;
151 #endif 152 #endif
152 } 153 }
153 154
154 void ChromeShellWindowDelegate::SetWebContentsBlocked( 155 void ChromeShellWindowDelegate::SetWebContentsBlocked(
155 content::WebContents* web_contents, 156 content::WebContents* web_contents,
156 bool blocked) { 157 bool blocked) {
157 // RenderViewHost may be NULL during shutdown. 158 // RenderViewHost may be NULL during shutdown.
158 content::RenderViewHost* host = web_contents->GetRenderViewHost(); 159 content::RenderViewHost* host = web_contents->GetRenderViewHost();
159 if (host) { 160 if (host) {
160 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( 161 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized(
161 host->GetRoutingID(), blocked)); 162 host->GetRoutingID(), blocked));
162 } 163 }
163 } 164 }
164 165
165 bool ChromeShellWindowDelegate::IsWebContentsVisible( 166 bool ChromeShellWindowDelegate::IsWebContentsVisible(
166 content::WebContents* web_contents) { 167 content::WebContents* web_contents) {
167 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); 168 return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
168 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698